System.Enum.Equals Method

Returns a value indicating whether this instance is equal to a specified object.

Syntax

public override bool Equals (object obj)

Parameters

obj
An object to compare with this instance, or null.
obj
An object to compare with this instance, or null.

Returns

true if obj is an enumeration value of the same type and with the same underlying value as this instance; otherwise, false.

Remarks

The Enum.Equals(object) method overrides ValueType.Equals(object) to define how enumeration members are evaluated for equality.

Requirements

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