Uri.UserEscaped Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

Syntax

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 ("http://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 ("http://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";

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

Uri Class

System Namespace