Share via


Uri.UserEscaped Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Indicates that the URI string was completely escaped before the Uri instance was created.

Namespace:  System
Assembly:  System (in System.dll)

Syntax

'Declaration
Public ReadOnly Property UserEscaped As Boolean
public bool UserEscaped { get; }

Property Value

Type: System.Boolean
A Boolean value that is true if the dontEscape parameter was set to true when the Uri instance was created; otherwise, false.

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.

Examples

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

Dim uriAddress3 As Uri = New Uri ("https://user:password@www.contoso.com/index.htm ")
outputBlock.Text &= uriAddress3.UserInfo
outputBlock.Text &= vbCrLf

If uriAddress.UserEscaped Then
  outputBlock.Text &= "Fully Escaped yes"
  outputBlock.Text &= vbCrLf
Else
  outputBlock.Text &= "Fully Escaped no"
  outputBlock.Text &= vbCrLf
End If
        Uri uriAddress3 = new Uri ("https://user:password@www.contoso.com/index.htm ");
        outputBlock.Text += uriAddress3.UserInfo;
        outputBlock.Text += "\n";

        if (uriAddress.UserEscaped)
            outputBlock.Text += "Fully Escaped yes\n";
        else    
            outputBlock.Text += "Fully Escaped no\n";

Uri uriAddress = new Uri ("https://user:password@www.contoso.com/index.htm ");
Console.WriteLine(uriAddress.UserInfo);
Console.WriteLine("Fully Escaped {0}", uriAddress.UserEscaped ? "yes" : "no");

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference