SqlDecimal Constructors

Definition

Initializes a new instance of the SqlDecimal structure.

Overloads

SqlDecimal(Decimal)

Initializes a new instance of the SqlDecimal structure using the supplied Decimal value.

SqlDecimal(Double)

Initializes a new instance of the SqlDecimal structure using the supplied double parameter.

SqlDecimal(Int32)

Initializes a new instance of the SqlDecimal structure using the supplied integer value.

SqlDecimal(Int64)

Initializes a new instance of the SqlDecimal structure using the supplied long integer value.

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

Initializes a new instance of the SqlDecimal structure using the supplied parameters.

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

Initializes a new instance of the SqlDecimal structure using the supplied parameters.

SqlDecimal(Decimal)

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied Decimal value.

C#
public SqlDecimal(decimal value);

Parameters

value
Decimal

The Decimal value to be stored as a SqlDecimal structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlDecimal(Double)

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied double parameter.

C#
public SqlDecimal(double dVal);

Parameters

dVal
Double

A double, representing the value for the new SqlDecimal structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlDecimal(Int32)

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied integer value.

C#
public SqlDecimal(int value);

Parameters

value
Int32

The supplied integer value which will the used as the value of the new SqlDecimal structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlDecimal(Int64)

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied long integer value.

C#
public SqlDecimal(long value);

Parameters

value
Int64

The supplied long integer value which will the used as the value of the new SqlDecimal structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied parameters.

C#
public SqlDecimal(byte bPrecision, byte bScale, bool fPositive, int[] bits);

Parameters

bPrecision
Byte

The maximum number of digits that can be used to represent the Value property of the new SqlDecimal structure.

bScale
Byte

The number of decimal places to which the Value property will be resolved for the new SqlDecimal structure.

fPositive
Boolean

A Boolean value that indicates whether the new SqlDecimal structure represents a positive or negative number.

bits
Int32[]

The 128-bit unsigned integer that provides the value of the new SqlDecimal.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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

Source:
SQLDecimal.cs
Source:
SQLDecimal.cs
Source:
SQLDecimal.cs

Initializes a new instance of the SqlDecimal structure using the supplied parameters.

C#
public SqlDecimal(byte bPrecision, byte bScale, bool fPositive, int data1, int data2, int data3, int data4);

Parameters

bPrecision
Byte

The maximum number of digits that can be used to represent the Value property of the new SqlDecimal structure.

bScale
Byte

The number of decimal places to which the Value property will be resolved for the new SqlDecimal structure.

fPositive
Boolean

A Boolean value that indicates whether the new SqlDecimal structure represents a positive or negative number.

data1
Int32

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

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

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

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.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1