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 ,以截斷至小數點左側對應的位置。

適用於

另請參閱