Because
int
variables are Value types, not reference, and Value types do not need
new
.
A Reference variable "points" at the actual data, a Value variable
is the actual data. So the declaration creates the whole space for the variable, instead of allocating enout space the the reference (or pointer).
This works for all Value Types, so if you declare a
struct
you will find the same thing:
public struct MyStruct
{
public int i;
public string s;
}
...
MyStruct ms;
ms.i = 66;
ms.s = "hello";
....