BigRational.Parse Method

Definition

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

Overload List

Parse(ReadOnlySpan<Char>, IFormatProvider)Parses a span of characters into a value.
Parse(String, IFormatProvider)Parses a string into a value.
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)Parses a span of characters into a value.
Parse(String, NumberStyles, IFormatProvider)Tries to parse a string into a value.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.
C#
public static BigRational Parse(
	ReadOnlySpan<char> s,
	IFormatProvider? provider
)

Parameters

s  ReadOnlySpan<Char>
The span of characters to parse.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.

Return Value

BigRational
The result of parsing s.

Implements

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

Exceptions

FormatExceptions is not in the correct format.
OverflowExceptions is not representable by TSelf.

Parse(String, IFormatProvider)

Parses a string into a value.
C#
public static BigRational Parse(
	string s,
	IFormatProvider? provider
)

Parameters

s  String
The string to parse.
provider  IFormatProvider
An object that provides culture-specific formatting information about s.

Return Value

BigRational
The result of parsing s.

Implements

IParsable<TSelf>.Parse(String, IFormatProvider)

Exceptions

ArgumentNullExceptions is null.
FormatExceptions is not in the correct format.
OverflowExceptions is not representable by TSelf.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Parses a span of characters into a value.
C#
public static BigRational Parse(
	ReadOnlySpan<char> s,
	NumberStyles style,
	IFormatProvider? provider
)

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.

Return Value

BigRational
The result of parsing s.

Implements

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

Exceptions

ArgumentExceptionstyle is not a supported NumberStyles value.
FormatExceptions is not in the correct format.
OverflowExceptions is not representable by TSelf.

Parse(String, NumberStyles, IFormatProvider)

Tries to parse a string into a value.
C#
public static BigRational Parse(
	string s,
	NumberStyles style,
	IFormatProvider? provider
)

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.

Return Value

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

Implements

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

Exceptions

ArgumentExceptionstyle is not a supported NumberStyles value.

See Also