다음을 통해 공유


SoapYearMonth 클래스

정의

XSD gYearMonth 형식을 래핑합니다.

public ref class SoapYearMonth sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapYearMonth = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapYearMonth = class
    interface ISoapXsd
Public NotInheritable Class SoapYearMonth
Implements ISoapXsd
상속
SoapYearMonth
특성
구현

예제

다음 코드 예제는 SoapYearMonth XSD를 래핑하는 클래스 gYearMonth 형식입니다.

using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // 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 );

   // Display the yearMonth in XSD format. 
   Console::WriteLine( "The yearMonth in XSD format is {0}.",
      yearMonth );

   // Display the XSD type string of this particular SoapYearMonth object.
   Console::WriteLine( "The XSD type of the SoapYearMonth instance is {0}.",
      yearMonth->GetXsdType() );

   // Display the value of the SoapYearMonth object.
   Console::WriteLine( "The value of the SoapYearMonth instance is {0}.",
      yearMonth->Value );

   // Display the sign of the SoapYearMonth object.
   Console::WriteLine( "The sign of the SoapYearMonth instance is {0}.",
      yearMonth->Sign );

   // Display the XSD type string of the SoapYearMonth class.
   Console::WriteLine( "The XSD type of the class SoapYearMonth is {0}.",
      SoapYearMonth::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // 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);

        // Display the yearMonth in XSD format. 
        Console.WriteLine("The yearMonth in XSD format is {0}.",
            yearMonth.ToString());

        // Display the XSD type string of this SoapYearMonth object.
        Console.WriteLine(
            "The XSD type of the SoapYearMonth object is {0}.",
            yearMonth.GetXsdType());

        // Display the value of the SoapYearMonth object.
        Console.WriteLine("The value of the SoapYearMonth object is {0}.",
            yearMonth.Value);

        // Display the sign of the SoapYearMonth object.
        Console.WriteLine("The sign of the SoapYearMonth object is {0}.",
            yearMonth.Sign);

        // Display the XSD type string of the SoapYearMonth class.
        Console.WriteLine("The XSD type of the class SoapYearMonth is {0}.",
            SoapYearMonth.XsdType);
    }
}

설명

XSD 데이터 형식에 대한 자세한 내용은 XML 데이터 형식 참조를 참조하세요.

생성자

SoapYearMonth()

SoapYearMonth 클래스의 새 인스턴스를 초기화합니다.

SoapYearMonth(DateTime)

지정된 SoapYearMonth 개체를 사용하여 DateTime 클래스의 새 인스턴스를 초기화합니다.

SoapYearMonth(DateTime, Int32)

지정된 SoapYearMonth 개체 및 DateTime가 양수 값인지 음수 값인지 나타내는 정수를 사용하여 Value 클래스의 새 인스턴스를 초기화합니다.

속성

Sign

현재 인스턴스의 날짜와 시간이 양수인지 음수인지를 가져오거나 설정합니다.

Value

현재 인스턴스의 날짜와 시간을 가져오거나 설정합니다.

XsdType

현재 SOAP 형식의 XSD(XML Schema Definition Language)를 가져옵니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetXsdType()

현재 SOAP 형식의 XSD(XML Schema Definition Language)를 반환합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Parse(String)

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

ToString()

ValueString으로 반환합니다.

적용 대상