using System;
public class Test
{
public static void Main()
{
int n;
try
{
// Do not initialize this variable here.
n = 123;
}
catch
{
}
// Error: Use of unassigned local variable 'n'.
Console.Write(n);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCSAgICBpbnQgbjsgIAoJCSAgICB0cnkgICAKCQkgICAgeyAgCgkJICAgICAgICAvLyBEbyBub3QgaW5pdGlhbGl6ZSB0aGlzIHZhcmlhYmxlIGhlcmUuICAKCQkgICAgICAgIG4gPSAxMjM7ICAKCQkgICAgfSAgCgkJICAgIGNhdGNoICAKCQkgICAgeyAgCgkJICAgIH0gIAoJCSAgICAvLyBFcnJvcjogVXNlIG9mIHVuYXNzaWduZWQgbG9jYWwgdmFyaWFibGUgJ24nLiAgCgkJICAgIENvbnNvbGUuV3JpdGUobik7IAoJfQp9
prog.cs(17,21): error CS0165: Use of unassigned local variable `n'
Compilation failed: 1 error(s), 0 warnings