SoapDay.Parse(String) Method

Definition

Converts the specified String into a SoapDay object.

public:
 static System::Runtime::Remoting::Metadata::W3cXsd2001::SoapDay ^ Parse(System::String ^ value);
public static System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay Parse (string value);
static member Parse : string -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay
Public Shared Function Parse (value As String) As SoapDay

Parameters

value
String

The String to convert.

Returns

A SoapDay object that is obtained from value.

Exceptions

value does not contain a date and time that corresponds to any of the recognized format patterns.

Examples

The following code example shows how to use the Parse method. This code example is part of a larger example that is provided for the SoapDay class.

// Parse an XSD gDay to create a SoapDay object.
// The time zone of this object is +08:00.
String^ xsdDay = "---30+08:00";
SoapDay^ day = SoapDay::Parse( xsdDay );
// Parse an XSD gDay to create a SoapDay object.
// The time zone of this object is +08:00.
string xsdDay = "---30+08:00";
SoapDay day = SoapDay.Parse(xsdDay);

Remarks

The Parse method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns.

Format Pattern Description Examples
dd The day of the month. Single-digit days have a leading zero. 23, 09
zzz The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero. "Z" means the current time zone. -07:00, +08:00, Z

Applies to