Conversions.ToInteger 方法

定义

将指定对象转换为整数值。Converts the specified object to an integer value.

重载

ToInteger(Object)

将对象转换为整数值。Converts an object to an integer value.

ToInteger(String)

将字符串转换为整数值。Converts a string to an integer value.

ToInteger(Object)

将对象转换为整数值。Converts an object to an integer value.

public:
 static int ToInteger(System::Object ^ Value);
public static int ToInteger (object Value);
static member ToInteger : obj -> int
Public Shared Function ToInteger (Value As Object) As Integer

参数

Value
Object

要转换的对象。The object to convert.

返回

该对象的 int 值。The int value of the object.

ToInteger(String)

将字符串转换为整数值。Converts a string to an integer value.

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

参数

Value
String

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

返回

该字符串的 int 值。The int value of the string.

适用于