語言

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

定義

嘗試將實例的典範字串表示 Uri 格式化到指定的範圍內。

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

適用於