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,
It is Bitwise shift left it works by shifting digits of binary equivalent of number by the given (right hand side) numbers.
so:
temp = 14 << 2
binary equivalent of 14 is 00001110
shifting it 2 times means pushing zero from right hand side and shifting each digit to left side which make it 00111000
equals to 56.
In your example:
i < (1 << list.Count)
and so on. In general it is equal 2 ^ list.Count
(2 raised to the power of list.Count)