Uri.UserInfo Property
Silverlight
Gets the user name, password, or other user-specific information associated with the specified URI.
Namespace: System
Assembly: System (in System.dll)
Property Value
Type: System.StringA String that contains the user information associated with the URI. The returned value does not include the '@' character reserved for delimiting the user information part of the URI.
| Exception | Condition |
|---|---|
| InvalidOperationException |
This property is valid only for an absolute Uri instance. |
The following example creates a Uri instance and writes the user information to the console.
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";
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.