SoapMonthDay.Parse(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
A SoapMonthDay object that is obtained from value
.
value
does not contain a date and time that corresponds to any of the recognized format patterns.
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);
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
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: