(pour consulter l’article précédent: Polymorhic enums in C#, generic incrementation) How can we implement a polymorphic enum to mimic the Java ones ? In a previous post, as an answer to @cyriux’s one, I showed how we could try to use a polymorphic enum in C# in order to mimic the Java ones. I have…
Étiquette : polymorphism
Programmation
Polymorphic enums in C# ?
by Pierre Irrmann •
Using Java as a inspiration source for C# (hmm wait, hasn’t that already been done from the start ?) A few weeks ago, I read this post by @cyriux, describing how you could use polymorphic enums in Java. Actually, I had already heard him telling that enums in C# were nothing like the ones in…
Programmation
Java Enums: You have grace, elegance and power and this is what I Love!
by Cyrille •
While Java 8 is coming, are you sure you know well the enums that were introduced in Java 5? Java enums are still underestimated, and it’s a pity since they are more useful than you might think, they’re not just for your usual enumerated constants! Java enum is polymorphic Java enums are real classes that…