Пример #1
0
 public int GetHashCode(TEnum obj) => EnumCastingUtil <TEnum, TBacker> .CastToBacker(obj).GetHashCode();
Пример #2
0
 public int Compare(TEnum lhs, TEnum rhs) => EnumCastingUtil <TEnum, TBacker> .CastToBacker(lhs)
 .CompareTo(EnumCastingUtil <TEnum, TBacker> .CastToBacker(rhs));
Пример #3
0
 public bool Equals(TEnum lhs, TEnum rhs) => //cast to backing type then compare
 EnumCastingUtil <TEnum, TBacker> .CastToBacker(lhs).Equals(EnumCastingUtil <TEnum, TBacker> .CastToBacker(rhs));