Bewerken

Share via


SqlDecimal.AdjustScale(SqlDecimal, Int32, Boolean) Method

Definition

The scale of the SqlDecimal operand will be adjusted to the number of digits indicated by the digits parameter. Depending on the value of the fRound parameter, the value will either be rounded to the appropriate number of digits or truncated.

public:
 static System::Data::SqlTypes::SqlDecimal AdjustScale(System::Data::SqlTypes::SqlDecimal n, int digits, bool fRound);
public static System.Data.SqlTypes.SqlDecimal AdjustScale (System.Data.SqlTypes.SqlDecimal n, int digits, bool fRound);
static member AdjustScale : System.Data.SqlTypes.SqlDecimal * int * bool -> System.Data.SqlTypes.SqlDecimal
Public Shared Function AdjustScale (n As SqlDecimal, digits As Integer, fRound As Boolean) As SqlDecimal

Parameters

n
SqlDecimal

The SqlDecimal structure to be adjusted.

digits
Int32

The number of digits in the adjusted structure.

fRound
Boolean

If this parameter is true, the new Value will be rounded, if false, the value will be truncated.

Returns

A new SqlDecimal structure whose Value property contains the adjusted number.

Applies to

See also