Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created January 7, 2011 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smsohan/770081 to your computer and use it in GitHub Desktop.
Save smsohan/770081 to your computer and use it in GitHub Desktop.
This excerpt is from ASP.NET MVC - the first example seems to be too geeky. Agree?
Which version is more readable?
[Flags]
public enum HttpVerbs {
Get = 1 << 0,
Post = 1 << 1,
Put = 1 << 2,
Delete = 1 << 3,
Head = 1 << 4
}
[Flags]
public enum HttpVerbs {
Get = 1,
Post = 2,
Put = 4,
Delete = 8,
Head = 16
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment