StringExtensions.AsFloat 方法

定義

多載

AsFloat(String, Single)

將字串轉換成 Single 數位,並指定預設值。

AsFloat(String)

將字串轉換成 Single 數位。

AsFloat(String, Single)

將字串轉換成 Single 數位,並指定預設值。

public static float AsFloat (this string value, float defaultValue);
static member AsFloat : string * single -> single
<Extension()>
Public Function AsFloat (value As String, defaultValue As Single) As Single

參數

value
String

要進行轉換的值。

defaultValue
Single

如果 為 value null,則傳回的值。

傳回

轉換的值。

適用於

AsFloat(String)

將字串轉換成 Single 數位。

public static float AsFloat (this string value);
static member AsFloat : string -> single
<Extension()>
Public Function AsFloat (value As String) As Single

參數

value
String

要進行轉換的值。

傳回

轉換的值。

適用於