Check if two enums are equal or not in C#
Enum.Equals(Object) Method is used to check whether the current instance is equal to a specified object or not. This method overrides ValueType.Equals(Object) to define how enumeration members are evaluated for equality.
public override bool Equals (object obj);
Here, obj is an object to compare with the current instance, or null.
Returns: This method returns true if obj is an enumeration value of the same type and with the same underlying value as current instance otherwise, false.
True False False