SqlDecimal 构造函数

定义

初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure.

重载

SqlDecimal(Decimal)

使用提供的 SqlDecimal 值初始化 Decimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied Decimal value.

SqlDecimal(Double)

使用提供的 double 类型的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied double parameter.

SqlDecimal(Int32)

使用提供的整数值初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied integer value.

SqlDecimal(Int64)

使用提供的长整数值初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied long integer value.

SqlDecimal(Byte, Byte, Boolean, Int32[])

使用提供的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied parameters.

SqlDecimal(Byte, Byte, Boolean, Int32, Int32, Int32, Int32)

使用提供的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied parameters.

SqlDecimal(Decimal)

使用提供的 SqlDecimal 值初始化 Decimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied Decimal value.

public:
 SqlDecimal(System::Decimal value);
public SqlDecimal (decimal value);
new System.Data.SqlTypes.SqlDecimal : decimal -> System.Data.SqlTypes.SqlDecimal
Public Sub New (value As Decimal)

参数

value
Decimal

要作为 Decimal 结构存储的 SqlDecimal 值。The Decimal value to be stored as a SqlDecimal structure.

另请参阅

SqlDecimal(Double)

使用提供的 double 类型的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied double parameter.

public:
 SqlDecimal(double dVal);
public SqlDecimal (double dVal);
new System.Data.SqlTypes.SqlDecimal : double -> System.Data.SqlTypes.SqlDecimal
Public Sub New (dVal As Double)

参数

dVal
Double

一个双精度型值,它表示新 SqlDecimal 结构的值。A double, representing the value for the new SqlDecimal structure.

另请参阅

SqlDecimal(Int32)

使用提供的整数值初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied integer value.

public:
 SqlDecimal(int value);
public SqlDecimal (int value);
new System.Data.SqlTypes.SqlDecimal : int -> System.Data.SqlTypes.SqlDecimal
Public Sub New (value As Integer)

参数

value
Int32

提供的整数值,它将用作新 SqlDecimal 结构的值。The supplied integer value which will the used as the value of the new SqlDecimal structure.

另请参阅

SqlDecimal(Int64)

使用提供的长整数值初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied long integer value.

public:
 SqlDecimal(long value);
public SqlDecimal (long value);
new System.Data.SqlTypes.SqlDecimal : int64 -> System.Data.SqlTypes.SqlDecimal
Public Sub New (value As Long)

参数

value
Int64

提供的长整型值,它将用作新 SqlDecimal 结构的值。The supplied long integer value which will the used as the value of the new SqlDecimal structure.

另请参阅

SqlDecimal(Byte, Byte, Boolean, Int32[])

使用提供的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied parameters.

public:
 SqlDecimal(System::Byte bPrecision, System::Byte bScale, bool fPositive, cli::array <int> ^ bits);
public SqlDecimal (byte bPrecision, byte bScale, bool fPositive, int[] bits);
new System.Data.SqlTypes.SqlDecimal : byte * byte * bool * int[] -> System.Data.SqlTypes.SqlDecimal
Public Sub New (bPrecision As Byte, bScale As Byte, fPositive As Boolean, bits As Integer())

参数

bPrecision
Byte

可用来表示新 Value 结构的 SqlDecimal 属性的最大位数。The maximum number of digits that can be used to represent the Value property of the new SqlDecimal structure.

bScale
Byte

Value 结构的 SqlDecimal 属性将解析为的小数位数。The number of decimal places to which the Value property will be resolved for the new SqlDecimal structure.

fPositive
Boolean

一个布尔值,它指示新的 SqlDecimal 结构是表示正数还是负数。A Boolean value that indicates whether the new SqlDecimal structure represents a positive or negative number.

bits
Int32[]

128 位无符号整数,提供新 SqlDecimal 的值。The 128-bit unsigned integer that provides the value of the new SqlDecimal.

另请参阅

SqlDecimal(Byte, Byte, Boolean, Int32, Int32, Int32, Int32)

使用提供的参数初始化 SqlDecimal 结构的新实例。Initializes a new instance of the SqlDecimal structure using the supplied parameters.

public:
 SqlDecimal(System::Byte bPrecision, System::Byte bScale, bool fPositive, int data1, int data2, int data3, int data4);
public SqlDecimal (byte bPrecision, byte bScale, bool fPositive, int data1, int data2, int data3, int data4);
new System.Data.SqlTypes.SqlDecimal : byte * byte * bool * int * int * int * int -> System.Data.SqlTypes.SqlDecimal
Public Sub New (bPrecision As Byte, bScale As Byte, fPositive As Boolean, data1 As Integer, data2 As Integer, data3 As Integer, data4 As Integer)

参数

bPrecision
Byte

可用来表示新 Value 结构的 SqlDecimal 属性的最大位数。The maximum number of digits that can be used to represent the Value property of the new SqlDecimal structure.

bScale
Byte

Value 结构的 SqlDecimal 属性将解析为的小数位数。The number of decimal places to which the Value property will be resolved for the new SqlDecimal structure.

fPositive
Boolean

一个布尔值,它指示新的 SqlDecimal 结构是表示正数还是负数。A Boolean value that indicates whether the new SqlDecimal structure represents a positive or negative number.

data1
Int32

一个 32 位无符号整数,它将与 data2、data3 和 data4 结合,以组成一个 128 位无符号整数,该整数表示新 SqlDecimal 结构值。An 32-bit unsigned integer which will be combined with data2, data3, and data4 to make up the 128-bit unsigned integer that represents the new SqlDecimal structures value.

data2
Int32

一个 32 位无符号整数,它将与 data1、data3 和 data4 结合,以组成一个 128 位无符号整数,该整数表示新 SqlDecimal 结构值。An 32-bit unsigned integer which will be combined with data1, data3, and data4 to make up the 128-bit unsigned integer that represents the new SqlDecimal structures value.

data3
Int32

一个 32 位无符号整数,它将与 data1、data2 和 data4 结合,以组成一个 128 位无符号整数,该整数表示新 SqlDecimal 结构值。An 32-bit unsigned integer which will be combined with data1, data2, and data4 to make up the 128-bit unsigned integer that represents the new SqlDecimal structures value.

data4
Int32

一个 32 位无符号整数,它将与 data1、data2 和 data3 结合,以组成一个 128 位无符号整数,该整数表示新 SqlDecimal 结构值。An 32-bit unsigned integer which will be combined with data1, data2, and data3 to make up the 128-bit unsigned integer that represents the new SqlDecimal structures value.

另请参阅

适用于