Enum.Equals Method (Object)
Returns a value indicating whether this instance is equal to a specified object.
Assembly: mscorlib (in mscorlib.dll)
The ValueType.Equals(Object) to define how enumeration members are evaluated for equality.method overrides
The following example defines two enumeration types, SledDog and WorkDog. The SledDog enumeration has two members, SledDog.AlaskanMalamute and SledDog.Malamute, that have the same underlying value. The call to the method indicates that these values are equal because their underlying values are the same. The SledDog.Malamute and WorkDog.Newfoundland members have the same underlying value, although they represent different enumeration types. A call to the method indicates that these values are not equal.
Available since 8
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1