BigInteger.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) 方法
定义
将此大整数实例格式设置到一个字符范围内。Formats this big integer instance into a span of characters.
public bool TryFormat (Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = default);
public bool TryFormat (Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider provider = default);
member this.TryFormat : Span<char> * int * ReadOnlySpan<char> * IFormatProvider -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer, Optional format As ReadOnlySpan(Of Char) = Nothing, Optional provider As IFormatProvider = Nothing) As Boolean
参数
将向其中写入此实例的字符范围。The span of characters into which this instance will be written.
- charsWritten
- Int32
方法返回时,包含以字符数表示的范围长度。When the method returns, contains the length of the span in number of characters.
- format
- ReadOnlySpan<Char>
字符的只读范围,指定格式设置操作的格式。A read-only span of characters that specifies the format for the formatting operation.
- provider
- IFormatProvider
一个对象,提供有关 value 的区域性特定格式设置信息。An object that supplies culture-specific formatting information about value.
返回
如果格式设置操作成功,则返回 true;否则返回 false。true if the formatting operation succeeds; false otherwise.