Boolean.TryFormat(Span<Char>, Int32) 方法
本文內容
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試將目前布林執行個體的值格式化為所提供字元範圍。
public:
bool TryFormat(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
C#
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
- charsWritten
- Int32
當這個方法傳回時,會包含以 寫入 destination
的字元數。
若格式化成功則為 true
,否則為 false
。
產品 | 版本 |
---|---|
.NET | Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Standard | 2.1 |