TimeWithZone.ToString Method (string, CultureInfo, TimeZoneInfo)TimeWithZone.ToString Method (String, CultureInfo, TimeZoneInfo)TimeWithZone::ToString Method (String^, CultureInfo^, TimeZoneInfo^)
- XmlPrime 3.0
- Other Versions ▼
Converts the value of the current TimeWithZoneTimeWithZoneTimeWithZone object to its equivalent string representation
using the specified format and culture-specific format information.
Syntax
Public Function ToString( _ format As String, _ cultureInfo As System.Globalization.CultureInfo, _ timeZoneInfo As TimeZoneInfo _ ) As String
public string ToString( string format, System.Globalization.CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo )
public: String^ ToString( String^ format, System.Globalization::CultureInfo^ cultureInfo, TimeZoneInfo^ timeZoneInfo )
Parameters
- format
- cultureInfo
Type: System.Globalization.CultureInfoSystem.Globalization.CultureInfoSystem.Globalization::CultureInfo^
A CultureInfoCultureInfoCultureInfo object that supplies culture-specific formatting information.
- timeZoneInfo
Type: XmlPrime.TimeZoneInfoXmlPrime.TimeZoneInfoXmlPrime::TimeZoneInfo^
The time zone information.
Return Value
Type: System.StringSystem.StringSystem::String^
A stringStringString representation of this TimeWithZoneTimeWithZoneTimeWithZone.
Exceptions
Exception | Condition |
ArgumentExceptionArgumentExceptionArgumentException | The syntax of the picture string in format is invalid. |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | format or cultureInfo is null
a null reference (Nothing in Visual Basic)
nullptr |
InvalidOperationExceptionInvalidOperationExceptionInvalidOperationException | A component specified within format is not available (e.g. time components). |
Remarks
The format must be a valid argument to the XSLT 2.0format-time
function.