Boolean.TryFormat(Span<Char>, Int32) 方法

定義

嘗試將目前布林執行個體的值格式化為所提供字元範圍。

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

參數

destination
Span<Char>

要在其中寫入此實例值的範圍,其格式為字元範圍。

charsWritten
Int32

當這個方法傳回時,會包含以 寫入 destination 的字元數。

傳回

若格式化成功則為 true,否則為 false

適用於