Complex<T>.Parse Method

Definition

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

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)Parses a string into a value.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.
C#
public static Complex<T> 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

Complex<T>
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 Complex<T> 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

Complex<T>
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 Complex<T> 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

Complex<T>
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)

Parses a string into a value.
C#
public static Complex<T> 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

Complex<T>
The result of parsing s.

Implements

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

Exceptions

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

See Also