Created
January 7, 2011 20:52
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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