© { JSL }
82
struct Use
·
usual dot operator to access field
w
field must be assigned before its value is used
w
default c'tor default initialises fields zero/
false
/
null
...
static void
Main()
{
Pair p;
p.X = 0;
Console.Write(p.X);
}
...
static void
Main()
{
Pair p =
new
Pair();
Console.Write(p.X);
}
p.X
stack
0
?
p.Y
p.X
0
0
p.Y