Uri.UserEscaped Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob die URI-Zeichenfolge vor dem Erstellen der Uri-Instanz vollständig mit Escapezeichen versehen war.

public:
 property bool UserEscaped { bool get(); };
public bool UserEscaped { get; }
member this.UserEscaped : bool
Public ReadOnly Property UserEscaped As Boolean

Eigenschaftswert

Boolean

true wenn der dontEscape Parameter auf true den Zeitpunkt der Erstellung der Uri Instanz festgelegt wurde; andernfalls false.

Beispiele

Im folgenden Beispiel wird eine Uri Instanz erstellt und bestimmt, ob sie beim Erstellen vollständig escapet wurde.

Uri^ uriAddress = gcnew Uri( "http://user:password@www.contoso.com/index.htm " );
Console::WriteLine( uriAddress->UserInfo );
Console::WriteLine( "Fully Escaped {0}",
   uriAddress->UserEscaped ? (String^)"yes" : "no" );
Uri uriAddress = new Uri ("http://user:password@www.contoso.com/index.htm ");
Console.WriteLine(uriAddress.UserInfo);
Console.WriteLine("Fully Escaped {0}", uriAddress.UserEscaped ? "yes" : "no");
let uriAddress = Uri "http://user:password@www.contoso.com/index.htm "
printfn $"{uriAddress.UserInfo}"
printfn $"""Fully Escaped {if uriAddress.UserEscaped then "yes" else "no"}"""
Dim uriAddress As New Uri("http://user:password@www.contoso.com/index.htm ")
Console.WriteLine(uriAddress.UserInfo)
Console.WriteLine("Fully Escaped {0}", IIf(uriAddress.UserEscaped, "yes", "no")) 'TODO: For performance reasons this should be changed to nested IF statements

Hinweise

Die UserEscaped Eigenschaft wird so festgelegt true , dass die zum Erstellen der Uri Instanz verwendete Zeichenfolge vollständig escapet wurde, bevor sie an den Konstruktor übergeben wurde. Das heißt, der dontEscape Parameter des Konstruktoraufrufs wurde auf festgelegt true.

Gilt für