اقرأ باللغة الإنجليزية تحرير

مشاركة عبر


Uri.UserEscaped Property

Definition

Gets a value that indicates whether the URI string was completely escaped before the Uri instance was created.

C#
public bool UserEscaped { get; }

Property Value

true if the dontEscape parameter was set to true when the Uri instance was created; otherwise, false.

Examples

The following example creates a Uri instance and determines whether it was fully escaped when it was created.

C#
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");

Remarks

The UserEscaped property is set to true to indicate that the string used to create the Uri instance was completely escaped before it was passed to the constructor; that is, the dontEscape parameter of the constructor call was set to true.

Applies to