Basically the questions in the title. I\'m looking at the MVC 2 source code:
[Flags]
public enum HttpVerbs {
Get = 1 << 0,
Post = 1 << 1,
Thats bit shifting. Its basically just moving the bits to the left by adding 0's to the right side.
public enum HttpVerbs {
Get = 1 << 0, // 00000001 -> 00000001 = 1
Post = 1 << 1, // 00000001 -> 00000010 = 2
Put = 1 << 2, // 00000001 -> 00000100 = 4
Delete = 1 << 3, // 00000001 -> 00001000 = 8
Head = 1 << 4 // 00000001 -> 00010000 = 16
}
More info at http://www.blackwasp.co.uk/CSharpShiftOperators.aspx