Skip to content

Instantly share code, notes, and snippets.

@fresky
Created July 17, 2012 00:56
Show Gist options
  • Save fresky/3126227 to your computer and use it in GitHub Desktop.
Save fresky/3126227 to your computer and use it in GitHub Desktop.
Loop Enum
enum ProgrammingLanguage
{
Language_First = 0,
CPP = 1,
CSharp = 2,
Java =3,
Language_Last = 4,
}
class Program
{
static void Main(string[] args)
{
for (ProgrammingLanguage language = ProgrammingLanguage.Language_First + 1; language < ProgrammingLanguage.Language_Last; language ++)
{
Console.WriteLine(language );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment