public override bool Equals(object obj) { var otherValue = obj as Enumeration; if (otherValue == null) { return(false); } var typeMatches = GetType().Equals(obj.GetType()); var valueMatches = Abbreviation.ToLower().Equals(otherValue.Abbreviation.ToLower()); Console.WriteLine(Abbreviation.ToString()); Console.WriteLine(otherValue.ToString()); return((typeMatches && valueMatches) || Abbreviation.ToString().Equals(otherValue.Abbreviation.ToString())); }
public override string ToString() => Abbreviation.ToLower();