共用方式為


SoapInteger 類別

定義

包裝 XSD integer 型別。

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

範例

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

#using <System.dll>
#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD formatted string to create a SoapInteger object.
   String^ xsdIntegerString = L"-13";
   SoapInteger^ xsdInteger = SoapInteger::Parse( xsdIntegerString );

   // Print the value of the SoapInteger object in XSD format.
   Console::WriteLine( L"The SoapInteger object in XSD format is {0}.",
      xsdInteger );

   // Print the XSD type string of the SoapInteger object.
   Console::WriteLine( L"The XSD type of the SoapInteger "
   L"object is {0}.", xsdInteger->GetXsdType() );

   // Print the value of the SoapInteger object.
   Console::WriteLine( L"The value of the SoapInteger object is {0}.",
      xsdInteger->Value );

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

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD formatted string to create a SoapInteger object.
        string xsdIntegerString = "-13";
        SoapInteger xsdInteger = SoapInteger.Parse(xsdIntegerString);

        // Print the value of the SoapInteger object in XSD format.
        Console.WriteLine("The SoapInteger object in XSD format is {0}.",
            xsdInteger.ToString());

        // Print the XSD type string of the SoapInteger object.
        Console.WriteLine("The XSD type of the SoapInteger " +
            "object is {0}.", xsdInteger.GetXsdType());

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

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

備註

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

建構函式

SoapInteger()

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

SoapInteger(Decimal)

使用 SoapInteger 值,初始化 Decimal 類別的新執行個體。

屬性

Value

取得或設定目前執行個體的數值。

XsdType

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

方法

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetXsdType()

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

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Parse(String)

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

ToString()

傳回當做 ValueString

適用於