Boolean.TryFormat(Span<Char>, Int32) Method

Definition

尝试将当前布尔实例的值的格式设置为提供的字符范围。Tries to format the value of the current boolean instance into the provided span of characters.

public:
 bool TryFormat(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat (Span<char> destination, out int charsWritten);
member this.TryFormat : Span<char> * int -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

Parameters

destination
Span<Char>

此方法返回时,此实例的值将设置为字符范围格式。When this method returns, this instance's value formatted as a span of characters.

charsWritten
Int32

此方法返回时,为写入到 destination 的字符数。When this method returns, the number of characters that were written in destination.

Returns

Boolean

如果格式设置成功,则为 true;否则为 falsetrue if the formatting was successful; otherwise, false.

Applies to