Skip to content

BigNumber.TryFormatOptimized Method

Definition

Namespace: Corvus.Numerics
Assembly: Corvus.Text.Json.dll
Source: BigNumber.OptimizedFormatting.cs

TryFormatOptimized(Span<char>, ref int, ReadOnlySpan<char>, IFormatProvider)

Tries to format this instance into the provided UTF-16 span with zero allocations.

public bool TryFormatOptimized(Span<char> destination, ref int charsWritten, ReadOnlySpan<char> format, IFormatProvider provider)

Parameters

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

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