Uri.UserEscaped プロパティ

定義

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 パラメーターは現在廃止されているため、このプロパティは非推奨となり、使用しないでください。

適用対象