SqlDecimal::ConvertToPrecScale Method (SqlDecimal, Int32, Int32)

 

Adjusts the value of the SqlDecimal operand to the indicated precision and scale.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

public:
static SqlDecimal ConvertToPrecScale(
	SqlDecimal n,
	int precision,
	int scale
)

Parameters

n
Type: System.Data.SqlTypes::SqlDecimal

The SqlDecimal structure whose value is to be adjusted.

precision
Type: System::Int32

The precision for the new SqlDecimal structure.

scale
Type: System::Int32

The scale for the new SqlDecimal structure.

Return Value

Type: System.Data.SqlTypes::SqlDecimal

A new SqlDecimal structure whose Value has been adjusted to the precision and scale indicated in the parameters.

.NET Framework
Available since 1.1
Return to top
Show: