SoapNegativeInteger 构造函数

定义

初始化 SoapNegativeInteger 类的新实例。

重载

SoapNegativeInteger()

初始化 SoapNegativeInteger 类的新实例。

SoapNegativeInteger(Decimal)

SoapNegativeInteger 值初始化 Decimal 类的新实例。

SoapNegativeInteger()

初始化 SoapNegativeInteger 类的新实例。

public:
 SoapNegativeInteger();
public SoapNegativeInteger ();
Public Sub New ()

示例

下面的代码示例演示如何使用此构造函数。

// Create a SoapNegativeInteger object.
SoapNegativeInteger^ xsdInteger = gcnew SoapNegativeInteger;
xsdInteger->Value = -14;
Console::WriteLine( L"The value of the SoapNegativeInteger object is {0}.",
   xsdInteger );
// Create a SoapNegativeInteger object.
SoapNegativeInteger xsdInteger =
    new SoapNegativeInteger();
xsdInteger.Value = -14;
Console.WriteLine(
    "The value of the SoapNegativeInteger object is {0}.",
    xsdInteger.ToString());

适用于

SoapNegativeInteger(Decimal)

SoapNegativeInteger 值初始化 Decimal 类的新实例。

public:
 SoapNegativeInteger(System::Decimal value);
public SoapNegativeInteger (decimal value);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger : decimal -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger
Public Sub New (value As Decimal)

参数

value
Decimal

用于初始化当前实例的 Decimal 值。

例外

value 大于 -1。

示例

下面的代码示例演示如何使用此构造函数。

// Create a SoapNegativeInteger object.
Decimal decimalValue = -14;
SoapNegativeInteger^ xsdInteger = gcnew SoapNegativeInteger( 
   decimalValue );
Console::WriteLine( L"The value of the SoapNegativeInteger object is {0}.",
   xsdInteger );
// Create a SoapNegativeInteger object.
decimal decimalValue = -14;
SoapNegativeInteger xsdInteger =
    new SoapNegativeInteger(decimalValue);
Console.WriteLine(
    "The value of the SoapNegativeInteger object is {0}.",
    xsdInteger.ToString());

适用于