NFloat.Parse 方法

定義

多載

Parse(String, NumberStyles, IFormatProvider)

將指定樣式及特定文化特性格式之數位的字串表示轉換為其相等浮點數。

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

將字元範圍,其中包含指定樣式和文化特性特定格式之數位的字串表示,轉換為對等的浮點數。

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

將UTF-8字元的範圍剖析為值。

Parse(String, IFormatProvider)

將指定之特定文化特性格式之數位的字串表示轉換為其對等的浮點數。

Parse(String)

將數位的字串表示轉換為其對等的浮點數。

Parse(ReadOnlySpan<Char>, IFormatProvider)

將字元範圍剖析為值。

Parse(ReadOnlySpan<Byte>, IFormatProvider)

將UTF-8字元的範圍剖析為值。

Parse(String, NumberStyles)

將指定樣式中數位的字串表示轉換為對等的浮點數。

Parse(String, NumberStyles, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將指定樣式及特定文化特性格式之數位的字串表示轉換為其相等浮點數。

public:
 static System::Runtime::InteropServices::NFloat Parse(System::String ^ s, System::Globalization::NumberStyles style, IFormatProvider ^ provider) = System::Numerics::INumberBase<System::Runtime::InteropServices::NFloat>::Parse;
public static System.Runtime.InteropServices.NFloat Parse (string s, System.Globalization.NumberStyles style, IFormatProvider? provider);
static member Parse : string * System.Globalization.NumberStyles * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As String, style As NumberStyles, provider As IFormatProvider) As NFloat

參數

s
String

字串,包含要轉換的數字。

style
NumberStyles

列舉值的位元組合,其表示 s 中可以存在的樣式項目。

provider
IFormatProvider

物件,其提供關於 s 的特定文化特性格式資訊。

傳回

浮點數,相當於 中指定的 s數值或符號。

實作

例外狀況

style 不是 NumberStyles 值。

-或-

style 包含 AllowHexSpecifier 值。

snull

s 不是有效格式的數字。

適用於

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將字元範圍,其中包含指定樣式和文化特性特定格式之數位的字串表示,轉換為對等的浮點數。

public static System.Runtime.InteropServices.NFloat Parse (ReadOnlySpan<char> s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.Float, IFormatProvider? provider = default);
static member Parse : ReadOnlySpan<char> * System.Globalization.NumberStyles * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As ReadOnlySpan(Of Char), Optional style As NumberStyles = System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.Float, Optional provider As IFormatProvider = Nothing) As NFloat

參數

s
ReadOnlySpan<Char>

字元範圍,其包含要轉換的數字。

style
NumberStyles

列舉值的位元組合,其表示 s 中可以存在的樣式項目。

provider
IFormatProvider

物件,其提供關於 s 的特定文化特性格式資訊。

傳回

浮點數,相當於 中指定的 s數值或符號。

實作

例外狀況

style 不是 NumberStyles 值。

-或-

style 包含 AllowHexSpecifier 值。

s 不是有效格式的數字。

適用於

Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs

將UTF-8字元的範圍剖析為值。

public static System.Runtime.InteropServices.NFloat Parse (ReadOnlySpan<byte> utf8Text, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.Float, IFormatProvider? provider = default);
static member Parse : ReadOnlySpan<byte> * System.Globalization.NumberStyles * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (utf8Text As ReadOnlySpan(Of Byte), Optional style As NumberStyles = System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.Float, Optional provider As IFormatProvider = Nothing) As NFloat

參數

utf8Text
ReadOnlySpan<Byte>

要剖析的UTF-8字元範圍。

style
NumberStyles

數字樣式的位元組合,可以存在於 中 utf8Text

provider
IFormatProvider

提供關於 utf8Text 之特定文化特性格式資訊的物件。

傳回

剖析 utf8Text的結果。

實作

適用於

Parse(String, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將指定之特定文化特性格式之數位的字串表示轉換為其對等的浮點數。

public:
 static System::Runtime::InteropServices::NFloat Parse(System::String ^ s, IFormatProvider ^ provider) = IParsable<System::Runtime::InteropServices::NFloat>::Parse;
public static System.Runtime.InteropServices.NFloat Parse (string s, IFormatProvider? provider);
static member Parse : string * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As String, provider As IFormatProvider) As NFloat

參數

s
String

字串,包含要轉換的數字。

provider
IFormatProvider

物件,其提供關於 s 的特定文化特性格式資訊。

傳回

浮點數,相當於 中指定的 s數值或符號。

實作

例外狀況

snull

s 不是有效格式的數字。

適用於

Parse(String)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將數位的字串表示轉換為其對等的浮點數。

public:
 static System::Runtime::InteropServices::NFloat Parse(System::String ^ s);
public static System.Runtime.InteropServices.NFloat Parse (string s);
static member Parse : string -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As String) As NFloat

參數

s
String

字串,包含要轉換的數字。

傳回

浮點數,相當於 中指定的 s數值或符號。

例外狀況

snull

s 不是有效格式的數字。

適用於

Parse(ReadOnlySpan<Char>, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將字元範圍剖析為值。

public:
 static System::Runtime::InteropServices::NFloat Parse(ReadOnlySpan<char> s, IFormatProvider ^ provider) = ISpanParsable<System::Runtime::InteropServices::NFloat>::Parse;
public static System.Runtime.InteropServices.NFloat Parse (ReadOnlySpan<char> s, IFormatProvider? provider);
static member Parse : ReadOnlySpan<char> * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As ReadOnlySpan(Of Char), provider As IFormatProvider) As NFloat

參數

s
ReadOnlySpan<Char>

要剖析的字元範圍。

provider
IFormatProvider

提供關於 s 之特定文化特性格式資訊的物件。

傳回

剖析 s的結果。

實作

適用於

Parse(ReadOnlySpan<Byte>, IFormatProvider)

來源:
NFloat.cs
來源:
NFloat.cs

將UTF-8字元的範圍剖析為值。

public:
 static System::Runtime::InteropServices::NFloat Parse(ReadOnlySpan<System::Byte> utf8Text, IFormatProvider ^ provider) = IUtf8SpanParsable<System::Runtime::InteropServices::NFloat>::Parse;
public static System.Runtime.InteropServices.NFloat Parse (ReadOnlySpan<byte> utf8Text, IFormatProvider? provider);
static member Parse : ReadOnlySpan<byte> * IFormatProvider -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (utf8Text As ReadOnlySpan(Of Byte), provider As IFormatProvider) As NFloat

參數

utf8Text
ReadOnlySpan<Byte>

要剖析的UTF-8字元範圍。

provider
IFormatProvider

提供關於 utf8Text 之特定文化特性格式資訊的物件。

傳回

剖析 utf8Text的結果。

實作

適用於

Parse(String, NumberStyles)

來源:
NFloat.cs
來源:
NFloat.cs
來源:
NFloat.cs

將指定樣式中數位的字串表示轉換為對等的浮點數。

public:
 static System::Runtime::InteropServices::NFloat Parse(System::String ^ s, System::Globalization::NumberStyles style);
public static System.Runtime.InteropServices.NFloat Parse (string s, System.Globalization.NumberStyles style);
static member Parse : string * System.Globalization.NumberStyles -> System.Runtime.InteropServices.NFloat
Public Shared Function Parse (s As String, style As NumberStyles) As NFloat

參數

s
String

字串,包含要轉換的數字。

style
NumberStyles

列舉值的位元組合,其表示 s 中可以存在的樣式項目。

傳回

浮點數,相當於 中指定的 s數值或符號。

例外狀況

style 不是 NumberStyles 值。

-或-

style 包含 AllowHexSpecifier 值。

snull

s 不是有效格式的數字。

適用於