共用方式為


SoapDay 類別

定義

包裝 XSD gDay 型別。

public ref class SoapDay sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapDay = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapDay = class
    interface ISoapXsd
Public NotInheritable Class SoapDay
Implements ISoapXsd
繼承
SoapDay
屬性
實作

範例

下列程式代碼範例示範如何使用 類別中的SoapDay成員,在物件與 XSD gDay 字串之間SoapDay轉換。

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

int main()
{
   // Parse an XSD gDay to create a SoapDay object.
   // The time zone of this object is +08:00.
   String^ xsdDay = "---30+08:00";
   SoapDay^ day = SoapDay::Parse( xsdDay );

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

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

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

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD gDay to create a SoapDay object.
        // The time zone of this object is +08:00.
        string xsdDay = "---30+08:00";
        SoapDay day = SoapDay.Parse(xsdDay);

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

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

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

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

備註

如需 XSD 資料類型的詳細資訊,請參閱 XML 數據類型參考

建構函式

SoapDay()

初始化 SoapDay 類別的新執行個體。

SoapDay(DateTime)

使用指定的 SoapDay 物件,初始化 DateTime 類別的新執行個體。

屬性

Value

取得或設定目前執行個體的日期和時間。

XsdType

取得目前 SOAP 型別的 XML 結構描述定義語言 (XSD)。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetXsdType()

傳回目前 SOAP 型別的 XML 結構描述定義語言 (XSD)。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Parse(String)

將指定的 String 轉換成 SoapDay 物件。

ToString()

傳回當做 ValueString

適用於