SqlDecimal.Round(SqlDecimal, Int32) 方法

定義

取得最接近指定之 SqlDecimal 結構值的數字 (具有指定的精確度)。

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 結構。

position
Int32

在傳回值中的有效分數位數 (精確度) 的數目。

傳回

SqlDecimal 結構,包含四捨五入運算的結果。

適用於

另請參閱