SqlDecimal.ConvertToPrecScale(SqlDecimal, Int32, Int32) SqlDecimal.ConvertToPrecScale(SqlDecimal, Int32, Int32) SqlDecimal.ConvertToPrecScale(SqlDecimal, Int32, Int32) SqlDecimal.ConvertToPrecScale(SqlDecimal, Int32, Int32) Method

定义

SqlDecimal 操作数的值调整为指定精度和小数位数。Adjusts the value of the SqlDecimal operand to the indicated precision and scale.

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 SqlDecimal SqlDecimal

将要调整其值的 SqlDecimal 结构。The SqlDecimal structure whose value is to be adjusted.

precision
Int32 Int32 Int32 Int32

SqlDecimal 结构的精度。The precision for the new SqlDecimal structure.

scale
Int32 Int32 Int32 Int32

SqlDecimal 结构的小数位数。The scale for the new SqlDecimal structure.

返回

一个新 SqlDecimal 结构,其值已经调整为参数中指定的精度和小数位数。A new SqlDecimal structure whose Value has been adjusted to the precision and scale indicated in the parameters.

适用于

另请参阅