Table of Contents

Class Url

Namespace
Ecng.Net
Assembly
Ecng.Net.dll

Represents a URL and provides functionality for URL manipulation and cloning.

public class Url : Uri, ISerializable, ICloneable<Url>, ICloneable
Inheritance
Url
Implements
ICloneable<Url>
Inherited Members
Extension Methods

Constructors

Url(string)

Initializes a new instance of the Url class using the specified URL string.

public Url(string url)

Parameters

url string

The URL string.

Url(string, string)

Initializes a new instance of the Url class by combining a base URL and a relative URL.

public Url(string basePart, string relativePart)

Parameters

basePart string

The base URL as a string.

relativePart string

The relative URL string.

Url(Uri)

Initializes a new instance of the Url class using the specified Uri.

public Url(Uri url)

Parameters

url Uri

The Uri to initialize the URL from.

Url(Uri, string)

Initializes a new instance of the Url class by combining a base Uri and a relative URL string.

public Url(Uri basePart, string relativePart)

Parameters

basePart Uri

The base Uri.

relativePart string

The relative URL string.

Properties

Encode

Gets or sets the type of encoding to apply on the URL.

public UrlEncodes Encode { get; set; }

Property Value

UrlEncodes

KeepDefaultPage

Gets or sets a value indicating whether the default page should be kept in the URL.

public bool KeepDefaultPage { get; set; }

Property Value

bool

QueryString

Gets the query string associated with the URL.

public QueryString QueryString { get; }

Property Value

QueryString

Methods

Clone()

Creates a new instance of the Url class that is a copy of the current instance.

public Url Clone()

Returns

Url

A new Url that is a copy of this instance.