BigFloat.TryParse Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

TryParse(String, BigFloat) Attempts to convert a string value to a BigFloat.
TryParse(ReadOnlySpan<Char>, IFormatProvider, BigFloat)Tries to parse a span of characters into a value.
TryParse(String, AccuracyGoal, BigFloat) Attempts to convert a string value to a BigFloat.
TryParse(String, IFormatProvider, BigFloat)Tries to parse a string into a value.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigFloat)Tries to parse a span of characters into a value.
TryParse(String, NumberStyles, IFormatProvider, BigFloat)Tries to parse a string into a value.
TryParse(ReadOnlySpan<Char>, AccuracyGoal, NumberStyles, IFormatProvider, BigFloat) Attempts to convert a span of characters to a BigFloat.
TryParse(String, AccuracyGoal, NumberStyles, IFormatProvider, BigFloat) Attempts to convert a string value to a BigFloat.

TryParse(String, BigFloat)

Attempts to convert a string value to a BigFloat.
C#
public static bool TryParse(
	string s,
	out BigFloat value
)

Parameters

s  String
The string to convert.
value  BigFloat
On return, the converted value.

Return Value

Boolean
true if the conversion was successful; otherwise false.

Exceptions

ArgumentNullException

value is null.

TryParse(ReadOnlySpan<Char>, IFormatProvider, BigFloat)

Tries to parse a span of characters into a value.
C#
public static bool TryParse(
	ReadOnlySpan<char> s,
	IFormatProvider? provider,
	out BigFloat result
)

Parameters

s  ReadOnlySpan<Char>
The span of characters to parse.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.
result  BigFloat
When this method returns, contains the result of successfully parsing s, or an undefined value on failure.

Return Value

Boolean
true if s was successfully parsed; otherwise, false.

Implements

ISpanParsable<TSelf>.TryParse(ReadOnlySpan<Char>, IFormatProvider, TSelf)

TryParse(String, AccuracyGoal, BigFloat)

Attempts to convert a string value to a BigFloat.
C#
public static bool TryParse(
	string s,
	AccuracyGoal accuracyGoal,
	out BigFloat value
)

Parameters

s  String
The string to convert.
accuracyGoal  AccuracyGoal
The AccuracyGoal for the parsed value.
value  BigFloat
On return, the converted value.

Return Value

Boolean
true if the conversion was successful; otherwise false.

Exceptions

ArgumentNullException

value is null.

TryParse(String, IFormatProvider, BigFloat)

Tries to parse a string into a value.
C#
public static bool TryParse(
	string s,
	IFormatProvider? provider,
	out BigFloat result
)

Parameters

s  String
The string to parse.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.
result  BigFloat
When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Return Value

Boolean
true if s was successfully parsed; otherwise, false.

Implements

IParsable<TSelf>.TryParse(String, IFormatProvider, TSelf)

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigFloat)

Tries to parse a span of characters into a value.
C#
public static bool TryParse(
	ReadOnlySpan<char> s,
	NumberStyles style,
	IFormatProvider? provider,
	out BigFloat result
)

Parameters

s  ReadOnlySpan<Char>
The span of characters to parse.
style  NumberStyles
A bitwise combination of number styles that can be present in s.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.
result  BigFloat
On return, contains the result of succesfully parsing s or an undefined value on failure.

Return Value

Boolean
true if s was successfully parsed; otherwise, false.

Implements

INumberBase<TSelf>.TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf)

Exceptions

ArgumentExceptionstyle is not a supported NumberStyles value.

TryParse(String, NumberStyles, IFormatProvider, BigFloat)

Tries to parse a string into a value.
C#
public static bool TryParse(
	string s,
	NumberStyles style,
	IFormatProvider? provider,
	out BigFloat result
)

Parameters

s  String
The string to parse.
style  NumberStyles
A bitwise combination of number styles that can be present in s.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.
result  BigFloat
On return, contains the result of succesfully parsing s or an undefined value on failure.

Return Value

Boolean
true if s was successfully parsed; otherwise, false.

Implements

INumberBase<TSelf>.TryParse(String, NumberStyles, IFormatProvider, TSelf)

Exceptions

ArgumentExceptionstyle is not a supported NumberStyles value.

TryParse(ReadOnlySpan<Char>, AccuracyGoal, NumberStyles, IFormatProvider, BigFloat)

Attempts to convert a span of characters to a BigFloat.
C#
public static bool TryParse(
	ReadOnlySpan<char> s,
	AccuracyGoal accuracyGoal,
	NumberStyles style,
	IFormatProvider? provider,
	out BigFloat value
)

Parameters

s  ReadOnlySpan<Char>
The span of characters to convert.
accuracyGoal  AccuracyGoal
The AccuracyGoal for the parsed value.
style  NumberStyles
A NumberStyles value that specifies the allowed formats of the string.
provider  IFormatProvider
An IFormatProvider that specifies how the string should be interpreted.
value  BigFloat
On return, the converted value.

Return Value

Boolean
true if the conversion was successful; otherwise false.

Exceptions

ArgumentNullException

value is null.

TryParse(String, AccuracyGoal, NumberStyles, IFormatProvider, BigFloat)

Attempts to convert a string value to a BigFloat.
C#
public static bool TryParse(
	string s,
	AccuracyGoal accuracyGoal,
	NumberStyles style,
	IFormatProvider? provider,
	out BigFloat value
)

Parameters

s  String
The string to convert.
accuracyGoal  AccuracyGoal
The AccuracyGoal for the parsed value.
style  NumberStyles
A NumberStyles value that specifies the allowed formats of the string.
provider  IFormatProvider
An IFormatProvider that specifies how the string should be interpreted.
value  BigFloat
On return, the converted value.

Return Value

Boolean
true if the conversion was successful; otherwise false.

Exceptions

ArgumentNullException

value is null.

See Also