Share via


SoapYear 클래스

정의

XSD gYear 형식을 래핑합니다.

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

예제

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

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

int main()
{
   // Parse an XSD date to create a SoapYear object.
   String^ xsdDate = "2003";
   SoapYear^ date = SoapYear::Parse( xsdDate );

   // Serialize a DateTime object as an XSD date string.
   Console::WriteLine( "The date in XSD format is {0}.",
      date );

   // Print out the XSD type string of this particular SoapYear object.
   Console::WriteLine( "The XSD type of the SoapYear instance is {0}.",
      date->GetXsdType() );

   // Print out the value of the SoapYear object.
   Console::WriteLine( "The value of the SoapYear instance is {0}.",
      date->Value );

   // Print out the sign of the SoapYear object.
   Console::WriteLine( "The sign of the SoapYear instance is {0}.",
      date->Sign );

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gYear to create a SoapYear object.
        // The time zone of this object is -08:00.
        string xsdYear = "2003-08:00";
        SoapYear year = SoapYear.Parse(xsdYear);

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

        // Print the XSD type string of this particular SoapYear object.
        Console.WriteLine("The XSD type of the SoapYear object is {0}.",
            year.GetXsdType());

        // Print the value of the SoapYear object.
        Console.WriteLine("The value of the SoapYear object is {0}.",
            year.Value);

        // Print the sign of the SoapYear object.
        Console.WriteLine("The sign of the SoapYear object is {0}.",
            year.Sign);

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

설명

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

생성자

SoapYear()

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

SoapYear(DateTime)

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

SoapYear(DateTime, Int32)

지정된 SoapYear 개체 및 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)

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

ToString()

ValueString으로 반환합니다.

적용 대상