Quad.TryFormat Method

Formats the value of the current instance using the specified format.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public bool TryFormat(
	Span<char> destination,
	out int charsWritten,
	ReadOnlySpan<char> format,
	IFormatProvider? provider
)

Parameters

destination  Span<Char>
The span the formatted value should be written to.
charsWritten  Int32
On return, the number of characters that was written to destination.
format  ReadOnlySpan<Char>
The String specifying the format to use or null to use the default format.
provider  IFormatProvider
The IFormatProvider to use to format the value or null to obtain the numeric format information from the current locale setting of the operating system.

Return Value

Boolean
true if the value was successfully written; otherwise false.

Implements

ISpanFormattable.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

See Also