© { JSL }
81
struct Creation
·
a
struct
local variable lives on the stack
w
is not definitely assigned, just like
int
w
can
always
be initialised with a default c'tor call
p.X
stack
?
?
p.Y
p.X
0
0
p.Y
...
static void
Main()
{
Pair p;
Console.Write(p.X);
...
}
...
static void
Main()
{
Pair p =
new
Pair();
Console.Write(p.X);
...
}
compile
time
error