Example #1
0
        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()));
        }
Example #2
0
 public override string ToString() => Abbreviation.ToLower();