Hello,
I am starting to learn C# using mono. The attached example taken from
"Programming C#" does not produce a compiler errormessage saying that the
variable myInt is used uninitialized. It compiles cleanly instead (used
mcs v0.11). Furthermore the uninitialized variable was not implicitly
initialized to 0 (as good C and C++ compilers do). I don't know, if this
is in error as well. The output from the run was
Uninitialized, myInt: -1073746096
After assignment, myInt: 5
--
Detlev Offenbach
[EMAIL PROTECTED]
class Values {
static void Main() {
int myInt;
System.Console.WriteLine("Uninitialized, myInt: {0}", myInt);
myInt = 5;
System.Console.WriteLine("After assignment, myInt: {0}", myInt);
}
}