다음을 통해 공유


SoapYearMonth.Parse(String) 메서드

정의

지정된 StringSoapYearMonth 개체로 변환합니다.

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

매개 변수

value
String

변환할 String입니다.

반환

value에서 가져온 SoapYearMonth 개체입니다.

예외

value에 인식된 형식 패턴에 해당하는 날짜와 시간이 포함되지 않은 경우

예제

다음 코드 예제에서는 이 메서드를 사용하는 방법을 보여 줍니다. 이 코드 예제는 제공 된 큰 예제의 일부는 SoapYearMonth 클래스입니다.

// Parse an XSD gYearMonth to create a SoapYearMonth object.
// The timezone of this object is -08:00.
String^ xsdYearMonth = "2003-11-08:00";
SoapYearMonth^ yearMonth = SoapYearMonth::Parse( xsdYearMonth );
// Parse an XSD gYearMonth to create a SoapYearMonth object.
// The time zone of this object is -08:00.
string xsdYearMonth = "2003-11-08:00";
SoapYearMonth yearMonth = SoapYearMonth.Parse(xsdYearMonth);

설명

Parse 메서드는 다양 한 형식의 문자열을 구문 분석할 수 있습니다. 다음 형식 패턴에서 인식할 수 있는 문자열 형식으로 구성 됩니다.

형식 패턴 Description 예제
yyyy 4 자리 형식의 연도입니다. 1999, 1812
MM 숫자 월입니다. 한 자리 월은 앞에 0입니다. 11, 05
zzz 전체 표준 시간대 오프셋 (시간 및 분) 협정 세계시 (그리니치 표준시)에서. 한 자리 시간의 경우 앞에 0이 있습니다. -07:00, 08:00

적용 대상