SoapMonthDay.Parse(String) Method

Definition

Converts the specified String into a SoapMonthDay object.

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

Parameters

value
String

The String to convert.

Returns

A SoapMonthDay 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 SoapMonthDay class.

// Parse an XSD gMonthDay to create a SoapMonthDay object.
// Parse the representation for February 21, in the UTC+8 time zone.
String^ xsdMonthDay = L"--02-21+08:00";
SoapMonthDay^ monthDay = SoapMonthDay::Parse( xsdMonthDay );
// Parse an XSD gMonthDay to create a SoapMonthDay object.
// Parse the representation for February 21, in the UTC+8 time zone.
string xsdMonthDay = "--02-21+08:00";
SoapMonthDay monthDay = SoapMonthDay.Parse(xsdMonthDay);

Remarks

The Parse method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table.

Format Pattern Description Examples
MM The numeric month. Single-digit months have a leading zero. 11, 05
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. -07:00, 08:00

Applies to