Why does the C # compiler not allow you to compile this:
int a; Console.WriteLine(a);
but allows you to compile:
MyStruct a; Console.WriteLine(a);
where MyStruct is defined as:
struct MyStruct { }
Update: in the first case, the error:
Error 1 Using unassigned local variable 'a'
mgamer
source share