This project has moved. For the latest updates, please go here.

EnumUtilities

Simple Enum utilities

GetValues<>()

Details:
  • Gets a collection of enums (useful for looping)
  • T : enum
Usage:
enum Tester { Test = 1, Bla = 5 }

// loop through them
foreach(var e in EnumUtilities.GetValues<Tester>())
    System.PrintLine(e.ToString() + " = " + (int)e);

Last edited Apr 17, 2013 at 5:32 PM by naspinski, version 2

Comments

No comments yet.