Windows Dev Center

UriBuilder Class

Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the Uri class.

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

public class UriBuilder

The UriBuilder type exposes the following members.

  NameDescription
Public methodUriBuilder()Initializes a new instance of the UriBuilder class.
Public methodUriBuilder(String)Initializes a new instance of the UriBuilder class with the specified URI.
Public methodUriBuilder(Uri)Initializes a new instance of the UriBuilder class with the specified Uri instance.
Public methodUriBuilder(String, String)Initializes a new instance of the UriBuilder class with the specified scheme and host.
Public methodUriBuilder(String, String, Int32)Initializes a new instance of the UriBuilder class with the specified scheme, host, and port.
Public methodUriBuilder(String, String, Int32, String)Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, and path.
Public methodUriBuilder(String, String, Int32, String, String)Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, path and query string or fragment identifier.
Top

  NameDescription
Public propertyFragmentGets or sets the fragment portion of the URI.
Public propertyHostGets or sets the Domain Name System (DNS) host name or IP address of a server.
Public propertyPasswordGets or sets the password associated with the user that accesses the URI.
Public propertyPathGets or sets the path to the resource referenced by the URI.
Public propertyPortGets or sets the port number of the URI.
Public propertyQueryGets or sets any query information included in the URI.
Public propertySchemeGets or sets the scheme name of the URI.
Public propertyUriGets the Uri instance constructed by the specified UriBuilder instance.
Public propertyUserNameThe user name associated with the user that accesses the URI.
Top

  NameDescription
Public methodEqualsCompares an existing Uri instance with the contents of the UriBuilder for equality. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for the URI. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns the display string for the specified UriBuilder instance. (Overrides Object.ToString().)
Top

The UriBuilder class provides a convenient way to modify the contents of a Uri instance without creating a new Uri instance for each modification.

The UriBuilder properties provide read/write access to the read-only Uri properties so that they can be modified.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2015 Microsoft