System.UriFormat Enumeration

Controls how URI information is escaped.

Syntax

public enum UriFormat

Remarks

This enumeration is used by the Uri.GetComponents(UriComponents, UriFormat) method to specify the level of character escaping in the returned URI.

RFC 2396 defines the standard escaping for URIs, and is available at tp://rfc-editor.org.

UriFormat.SafeUnescaped leaves the following characters escaped if the character has a reserved meaning in the requested UriComponents: "%", "#", "?", "/", "\", and "@".

Members

Member NameDescription
SafeUnescaped

Characters that have a reserved meaning in the requested URI components remain escaped. All others are not escaped. See Remarks.

Unescaped

No escaping is performed.

UriEscaped

Escaping is performed according to the rules in RFC 2396.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0