DecimalType.FromString 方法

定义

返回与指定的字符串以及可选的数字格式信息相对应的 Decimal 值。Returns a Decimal value that corresponds to the specified string and optional number format information.

重载

FromString(String)

此 API 支持产品基础结构,不能在代码中直接使用。

返回与指定的字符串相对应的 Decimal 值。Returns a Decimal value that corresponds to the specified string.

FromString(String, NumberFormatInfo)

此 API 支持产品基础结构,不能在代码中直接使用。

返回与指定的字符串和数字格式信息相对应的 Decimal 值。Returns a Decimal value that corresponds to the specified string and number format information.

注解

此类支持 Visual Basic 编译器,不应在代码中直接使用。This class supports the Visual Basic compiler and is not intended to be used directly from your code.

FromString(String)

返回与指定的字符串相对应的 Decimal 值。Returns a Decimal value that corresponds to the specified string.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::Decimal FromString(System::String ^ Value);
public static decimal FromString (string? Value);
public static decimal FromString (string Value);
static member FromString : string -> decimal
Public Shared Function FromString (Value As String) As Decimal
Public Function FromString (Value As String) As Decimal

参数

Value
String

必需。Required. 要转换为 Decimal 值的字符串。String to convert to a Decimal value.

返回

Decimal

Value 对应的 Decimal 值。The Decimal value that corresponds to Value.

注解

此类支持 Visual Basic 编译器,不应在代码中直接使用。This class supports the Visual Basic compiler and is not intended to be used directly from your code.

适用于

FromString(String, NumberFormatInfo)

返回与指定的字符串和数字格式信息相对应的 Decimal 值。Returns a Decimal value that corresponds to the specified string and number format information.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::Decimal FromString(System::String ^ Value, System::Globalization::NumberFormatInfo ^ NumberFormat);
public static decimal FromString (string? Value, System.Globalization.NumberFormatInfo? NumberFormat);
public static decimal FromString (string Value, System.Globalization.NumberFormatInfo NumberFormat);
static member FromString : string * System.Globalization.NumberFormatInfo -> decimal
Public Shared Function FromString (Value As String, NumberFormat As NumberFormatInfo) As Decimal
Public Function FromString (Value As String, NumberFormat As NumberFormatInfo) As Decimal

参数

Value
String

必需。Required. 要转换为 Decimal 值的字符串。String to convert to a Decimal value.

NumberFormat
NumberFormatInfo

根据区域性定义如何设置数值格式以及如何显示数值的 NumberFormatInfo 对象。A NumberFormatInfo object that defines how numeric values are formatted and displayed, depending on the culture.

返回

Decimal

Value 对应的 Decimal 值。The Decimal value that corresponds to Value.

注解

此类支持 Visual Basic 编译器,不应在代码中直接使用。This class supports the Visual Basic compiler and is not intended to be used directly from your code.

适用于