SqlDecimal.Truncate(SqlDecimal, Int32) SqlDecimal.Truncate(SqlDecimal, Int32) SqlDecimal.Truncate(SqlDecimal, Int32) SqlDecimal.Truncate(SqlDecimal, Int32) Method

定义

将指定 SqlDecimal 结构的值截断到希望的位置。Truncates the specified SqlDecimal structure's value to the that you want position.

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

要截断的 SqlDecimal 结构。The SqlDecimal structure to be truncated.

position
Int32 Int32 Int32 Int32

数字将要截断到的小数位置。The decimal position to which the number will be truncated.

返回

position 参数提供一个负值,以便将该值截断到小数点左侧对应的位置。Supply a negative value for the position parameter in order to truncate the value to the corresponding position to the left of the decimal point.

适用于

另请参阅