SqlDecimal.ConvertToPrecScale(SqlDecimal, Int32, Int32) 方法

定義

SqlDecimal 運算元的值調整成指示的精確度和小數位數。

public:
 static System::Data::SqlTypes::SqlDecimal ConvertToPrecScale(System::Data::SqlTypes::SqlDecimal n, int precision, int scale);
public static System.Data.SqlTypes.SqlDecimal ConvertToPrecScale (System.Data.SqlTypes.SqlDecimal n, int precision, int scale);
static member ConvertToPrecScale : System.Data.SqlTypes.SqlDecimal * int * int -> System.Data.SqlTypes.SqlDecimal
Public Shared Function ConvertToPrecScale (n As SqlDecimal, precision As Integer, scale As Integer) As SqlDecimal

參數

n
SqlDecimal

要調整值的 SqlDecimal 結構。

precision
Int32

SqlDecimal 結構的精確度。

scale
Int32

SqlDecimal 結構的小數點位數。

傳回

新的 SqlDecimal 結構,其 Value 已經被調整成參數中所指示的精確度和小數位數。

適用於

另請參閱