NFloat.Parse Method

Definition

Overloads

Parse(String)

Converts the string representation of a number to its floating-point number equivalent.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.

Parse(String, NumberStyles)

Converts the string representation of a number in a specified style to its floating-point number equivalent.

Parse(String, IFormatProvider)

Converts the string representation of a number in a specified culture-specific format to its floating-point number equivalent.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converts a character span that contains the string representation of a number in a specified style and culture-specific format to its floating-point number equivalent.

Parse(String, NumberStyles, IFormatProvider)

Converts the string representation of a number in a specified style and culture-specific format to its floating-point number equivalent.

Parse(String)

Converts the string representation of a number to its floating-point number equivalent.

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

Parameters

s
String

A string that contains the number to convert.

Returns

NFloat

A floating-point number that is equivalent to the numeric value or symbol specified in s.

Exceptions

s does not represent a number in a valid format.

Applies to

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.

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

Parameters

provider
IFormatProvider

Returns

NFloat

The result of parsing s.

Implements

Applies to

Parse(String, NumberStyles)

Converts the string representation of a number in a specified style to its floating-point number equivalent.

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

Parameters

s
String

A string that contains the number to convert.

style
NumberStyles

A bitwise combination of enumeration values that indicate the style elements that can be present in s.

Returns

NFloat

A floating-point number that is equivalent to the numeric value or symbol specified in s.

Exceptions

style is not a NumberStyles value.

-or-

style includes the AllowHexSpecifier value.

s does not represent a number in a valid format.

Applies to

Parse(String, IFormatProvider)

Converts the string representation of a number in a specified culture-specific format to its floating-point number equivalent.

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

Parameters

s
String

A string that contains the number to convert.

provider
IFormatProvider

An object that supplies culture-specific formatting information about s.

Returns

NFloat

A floating-point number that is equivalent to the numeric value or symbol specified in s.

Implements

Exceptions

s does not represent a number in a valid format.

Applies to

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converts a character span that contains the string representation of a number in a specified style and culture-specific format to its floating-point number equivalent.

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

Parameters

s
ReadOnlySpan<Char>

A character span that contains the number to convert.

style
NumberStyles

A bitwise combination of enumeration values that indicate the style elements that can be present in s.

provider
IFormatProvider

An object that supplies culture-specific formatting information about s.

Returns

NFloat

A floating-point number that is equivalent to the numeric value or symbol specified in s.

Implements

Exceptions

style is not a NumberStyles value.

-or-

style includes the AllowHexSpecifier value.

s does not represent a number in a valid format.

Applies to

Parse(String, NumberStyles, IFormatProvider)

Converts the string representation of a number in a specified style and culture-specific format to its floating-point number equivalent.

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

Parameters

s
String

A string that contains the number to convert.

style
NumberStyles

A bitwise combination of enumeration values that indicate the style elements that can be present in s.

provider
IFormatProvider

An object that supplies culture-specific formatting information about s.

Returns

NFloat

A floating-point number that is equivalent to the numeric value or symbol specified in s.

Implements

Exceptions

style is not a NumberStyles value.

-or-

style includes the AllowHexSpecifier value.

s does not represent a number in a valid format.

Applies to