Complex<T>.To String Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| ToString() | Converts the numeric value of this instance to its equivalent string representation. |
| ToString( | Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
| ToString( | Converts the numeric value of this instance to its equivalent string representation using the specified format. |
| ToString( | Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
ToString
Converts the numeric value of this instance to its
equivalent string representation.
public override string ToString()Return Value
StringThe string representation of the value of this instance.
ToString(IFormatProvider)
Converts the numeric value of this instance to its
equivalent string representation using the specified
culture-specific format information.
public string ToString(
IFormatProvider provider
)Parameters
- provider IFormatProvider
- An IFormatProvider that supplies culture-specific formatting information.
Return Value
StringThe string representation of the value of this instance.
ToString(String)
Converts the numeric value of this instance to its
equivalent string representation using the specified
format.
public string ToString(
string? format
)Parameters
- format String
- A format string.
Return Value
StringThe string representation of the value of this instance.
Exceptions
| Format | format is invalid. |
ToString(String, IFormatProvider)
Converts the numeric value of this instance to its
equivalent string representation using the specified
format and culture-specific format information.
public string ToString(
string? format,
IFormatProvider? provider
)Parameters
- format String
- A format string.
- provider IFormatProvider
- An IFormatProvider that supplies culture-specific formatting information.
Return Value
StringThe string representation of the value of this instance.
Implements
IFormattable.ToString(String, IFormatProvider)Remarks
Uses algebraic notation, such as 1.5 - 2.5i, with component formatting supplied by format and provider. If the imaginary component is zero, only the real component is written. This differs from Microsoft's generic complex pair notation.
The current parsing APIs do not guarantee acceptance of this presentation format. Serialize the components separately when a round trip is required.
Exceptions
| Format | format is invalid. |