System.Guid.CompareTo Method

Compares this instance to a specified Guid object and returns an indication of their relative values.

Syntax

public int CompareTo (Guid value)

Parameters

value
An object to compare to this instance.

Returns

A signed number indicating the relative values of this instance and value.

A negative integer

This instance is less than value.

Zero

This instance is equal to value.

A positive integer

This instance is greater than value.

Remarks

This method implements the IComparable`1 interface and performs slightly better than the Guid.CompareTo(object) method because it does not have to convert the value parameter to an object.

Requirements

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