共用方式為


Uri.TryEscapeDataString 方法

定義

嘗試將範圍轉換成其逸出表示法。

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

參數

charsToEscape
ReadOnlySpan<Char>

要逸出的範圍。

destination
Span<Char>

包含作業逸出結果的輸出範圍。

charsWritten
Int32

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

傳回

如果 destination 夠大,足以保存整個結果,true;否則,false

適用於