XmlConvert.ToInt32(String) 方法

定义

String 转换为等效的 Int32Converts the String to a Int32 equivalent.

public:
 static int ToInt32(System::String ^ s);
public static int ToInt32 (string s);
static member ToInt32 : string -> int
Public Shared Function ToInt32 (s As String) As Integer

参数

s
String

要转换的字符串。The string to convert.

返回

Int32

与该字符串等效的 Int32An Int32 equivalent of the string.

例外

snulls is null.

s 的格式不正确。s is not in the correct format.

s 表示一个小于 MinValue 或大于 MaxValue 的数字。s represents a number less than MinValue or greater than MaxValue.

适用于