다음을 통해 공유


SoapDateTime 클래스

정의

XSD dateTime으로 형식이 지정된 문자열에 DateTime의 serialization 및 deserialization을 위한 정적 메서드를 제공합니다.

public ref class SoapDateTime sealed
public sealed class SoapDateTime
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapDateTime
type SoapDateTime = class
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapDateTime = class
Public NotInheritable Class SoapDateTime
상속
SoapDateTime
특성

예제

다음 코드 예제에서 메서드를 사용 하는 방법을 보여 줍니다 합니다 SoapDateTime 간을 변환 하는 클래스를 DateTime 개체와 XSD dateTime 문자열입니다.

using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;
int main()
{
   
   // Parse an XSD dateTime to create a DateTime object.
   String^ xsdDateTime = "2003-02-04T13:58:59.9999999+03:00";
   DateTime dateTime = SoapDateTime::Parse( xsdDateTime );
   
   // Serialize a DateTime object as an XSD dateTime string.
   Console::WriteLine( "The date in XSD format is {0}.", SoapDateTime::ToString( dateTime ) );
   
   // Print out the XSD type string of the SoapDateTime class.
   Console::WriteLine( "The XSD type of SoapDateTime is {0}.", SoapDateTime::XsdType );
   
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD dateTime to create a DateTime object.
        string xsdDateTime = "2003-02-04T13:58:59.9999999+03:00";
        DateTime dateTime = SoapDateTime.Parse(xsdDateTime);

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

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

설명

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

생성자

SoapDateTime()

SoapDateTime의 인스턴스를 만듭니다.

속성

XsdType

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

메서드

Equals(Object)

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

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

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

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

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

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

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

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

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

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
ToString(DateTime)

지정된 DateTime 개체를 String으로 반환합니다.

적용 대상