SqlDecimal.Round(SqlDecimal, Int32) SqlDecimal.Round(SqlDecimal, Int32) SqlDecimal.Round(SqlDecimal, Int32) SqlDecimal.Round(SqlDecimal, Int32) Method

定义

以指定精度获取与指定 SqlDecimal 结构的值最接近的数字。Gets the number nearest the specified SqlDecimal structure's value with the specified precision.

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

参数

n
SqlDecimal SqlDecimal SqlDecimal SqlDecimal

要舍入的 SqlDecimal 结构。The SqlDecimal structure to be rounded.

position
Int32 Int32 Int32 Int32

返回值中的有效小数位数(精度)。The number of significant fractional digits (precision) in the return value.

返回

一个 SqlDecimal 结构,其中包含该舍入运算的结果。A SqlDecimal structure that contains the results of the rounding operation.

适用于

另请参阅