Conversions.ToSingle 方法

定义

将指定的对象转换为 Single 值。Converts the specified object to a Single value.

重载

ToSingle(Object)

将对象转换为 Single 值。Converts an object to a Single value.

ToSingle(String)

String 转换为 Single 值。Converts a String to a Single value.

ToSingle(Object)

将对象转换为 Single 值。Converts an object to a Single value.

public:
 static float ToSingle(System::Object ^ Value);
public static float ToSingle (object Value);
public static float ToSingle (object? Value);
static member ToSingle : obj -> single
Public Shared Function ToSingle (Value As Object) As Single

参数

Value
Object

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

返回

Single

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

适用于

ToSingle(String)

String 转换为 Single 值。Converts a String to a Single value.

public:
 static float ToSingle(System::String ^ Value);
public static float ToSingle (string Value);
public static float ToSingle (string? Value);
static member ToSingle : string -> single
Public Shared Function ToSingle (Value As String) As Single

参数

Value
String

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

返回

Single

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

适用于