An int declaration without assignment (as indicated in the comments) will be optimized by the compiler - it will not be displayed in the program at all.
, ( ) int, (.. int , , ).
, int ( ), , ( , ).
int.
:
int . Int (4 ), , , , 4 . , 4 ( ) , 4 , ( ). . , .
, .NET 2 - #, # IL JIT, IL . , "", , , .
, ...
void Foo() {
{
int a = 5;
Console.WriteLine(a);
}
{
int a = 7;
Console.WriteLine(a);
}
}
... , , a , . .
, - , (, ), .
, , # JIT - , , . .