XmlConvert.ToInt32(String) 方法

定义

String将转换为等效项Int32

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

要转换的字符串。

返回

字符串 Int32 的等效项。

例外

snull

s 格式不正确。

s 表示小于 Int32.MinValue 或大于 Int32.MaxValue 的数字。

适用于