During the declaration of local variables, they are stored on the stack and memory is also allocated the same time. In case of int, it takes its default value 0.
And MSDN states "uninitialized variables in C# is not allowed" and so it takes its default value. 0 as in case of an int.
But if I write a code like int a; int b=a; I will get an error like "use of unassigned local variable a". In this case why is it not taking the default value 0?