SqlDecimal.Truncate(SqlDecimal, Int32) 方法

定義

將指定的 SqlDecimal 結構之值截斷到想要的位置。

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

參數

n
SqlDecimal

要被截斷的 SqlDecimal 結構。

position
Int32

將截斷數字的小數點位置。

傳回

提供 position 參數的負值,以便將該值截斷至小數點左邊的對應位置。

適用於

另請參閱