When and how should I use enumeration classes rather than enums?
问题 A developer at work recently started using a class pattern instead of enums in places where enums would usually fit. Instead, he uses something similar to that below: internal class Suit { public static readonly Suit Hearts = new Suit(); public static readonly Suit Diamonds = new Suit(); public static readonly Suit Spades = new Suit(); public static readonly Suit Clubs = new Suit(); public static readonly Suit Joker = new Suit(); private static Suit() { } public static bool IsMatch(Suit lhs,