Skip to content

BigNumber.TryFormat Method

Definition

Namespace: Corvus.Numerics
Assembly: Corvus.Text.Json.dll

Overloads

Method Description
TryFormat(Span<char>, int, ReadOnlySpan<char>, IFormatProvider?) Tries to format this BigNumber value into the provided character span.
TryFormat(Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?) Tries to format this BigNumber value into the provided UTF-8 byte span.
TryFormat(Span<char>, int) Tries to format this BigNumber value into the provided character span using default formatting.
TryFormat(Span<byte>, int) Tries to format this BigNumber value into the provided UTF-8 byte span using default formatting.

TryFormat(Span<char>, int, ReadOnlySpan<char>, IFormatProvider?)

Source: BigNumber.cs

Tries to format this BigNumber value into the provided character span.

public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

Parameters

Name Type Description
destination Span<char> The destination span.
charsWritten int The number of characters written to the destination.
format ReadOnlySpan<char> The format string.
provider IFormatProvider? The format provider.

Returns

bool

true if formatting succeeded; otherwise, false.

Implements

ISpanFormattable.TryFormat

Applies To

Product Versions
.NET 9, 10

TryFormat(Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?)

Source: BigNumber.cs

Tries to format this BigNumber value into the provided UTF-8 byte span.

public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

Parameters

Name Type Description
utf8Destination Span<byte> The destination UTF-8 byte span.
bytesWritten int The number of bytes written to the destination.
format ReadOnlySpan<char> The format string.
provider IFormatProvider? The format provider.

Returns

bool

true if formatting succeeded; otherwise, false.

Implements

IUtf8SpanFormattable.TryFormat

Applies To

Product Versions
.NET 9, 10

TryFormat(Span<char>, int)

Source: BigNumber.cs

Tries to format this BigNumber value into the provided character span using default formatting.

public bool TryFormat(Span<char> destination, out int charsWritten)

Parameters

Name Type Description
destination Span<char> The destination span.
charsWritten int The number of characters written to the destination.

Returns

bool

true if formatting succeeded; otherwise, false.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

TryFormat(Span<byte>, int)

Source: BigNumber.cs

Tries to format this BigNumber value into the provided UTF-8 byte span using default formatting.

public bool TryFormat(Span<byte> destination, out int bytesWritten)

Parameters

Name Type Description
destination Span<byte> The destination UTF-8 byte span.
bytesWritten int The number of bytes written to the destination.

Returns

bool

true if formatting succeeded; otherwise, false.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue