Mono Class Library: System.Uri Overview | Members

System.Uri.Equals Method

Compares the current instance and the specified object for equality.

public override bool Equals (object comparant)

Parameters

comparant
The Uri instance to compare with the current instance. This argument can be a string or a Uri .

Returns

true if comparand represents the same URI (ignoring any fragment or query information) as the current instance; otherwise, false . If comparand is null, a zero-length string, or is not an instance of string or Uri , returns false.

Remarks

If comparand is a string, it is converted to a Uri by calling Uri(comparand).

The Uri.Scheme, Uri.Host and unescaped version of the Uri.AbsolutePath of the current instance and comparand are compared for equality.

If the scheme of the current instance is the Uri.UriSchemeFile scheme, the absolute paths are compared in accordance with the case sensitivity of the current platform.

Note: This method overrides object.Equals(object).

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0