Freigeben über


UriBuilder Class

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

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

Inheritance Hierarchy

System.Object
  System.UriBuilder

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

Syntax

'Declaration
Public Class UriBuilder
public class UriBuilder

The UriBuilder type exposes the following members.

Constructors

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder() Initializes a new instance of the UriBuilder class.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(String) Initializes a new instance of the UriBuilder class with the specified URI.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(Uri) Initializes a new instance of the UriBuilder class with the specified Uri instance.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(String, String) Initializes a new instance of the UriBuilder class with the specified scheme and host.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(String, String, Int32) Initializes a new instance of the UriBuilder class with the specified scheme, host, and port.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(String, String, Int32, String) Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, and path.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UriBuilder(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

Properties

  Name Description
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Fragment Gets or sets the fragment portion of the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Host Gets or sets the Domain Name System (DNS) host name or IP address of a server.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Password Gets or sets the password associated with the user that accesses the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Path Gets or sets the path to the resource referenced by the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Port Gets or sets the port number of the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Query Gets or sets any query information included in the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Scheme Gets or sets the scheme name of the URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 Uri Gets the Uri instance constructed by the specified UriBuilder instance.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360 UserName The user name associated with the user that accesses the URI.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Equals Compares an existing Uri instance with the contents of the UriBuilder for equality. (Overrides Object.Equals(Object).)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetHashCode Returns the hash code for the URI. (Overrides Object.GetHashCode().)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetType Gets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToString Returns the display string for the specified UriBuilder instance. (Overrides Object.ToString().)

Top

Remarks

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.

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.

Thread Safety

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

See Also

Reference

Uri