Uri.UserEscaped プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Uri インスタンスが作成される前に URI 文字列が完全にエスケープされたかどうかを示す値を取得します。
public:
property bool UserEscaped { bool get(); };
public bool UserEscaped { get; }
member this.UserEscaped : bool
Public ReadOnly Property UserEscaped As Boolean
プロパティ値
true
dontEscape インスタンスの作成時に true パラメーターがUriに設定されている場合は >、それ以外の場合はfalse。
例
次の例では、 Uri インスタンスを作成し、作成時に完全にエスケープされたかどうかを判断します。
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
注釈
UserEscaped プロパティは、もともと、Uri インスタンスの作成に使用される文字列がコンストラクターに渡される前に完全にエスケープされたことを示すように設計されています。つまり、コンストラクター呼び出しのdontEscape パラメーターがtrueに設定されています。 ただし、 dontEscape パラメーターは現在廃止されているため、このプロパティは非推奨となり、使用しないでください。