·a ref
parameter is an alias for the argument
wno copy
takes place
wargument
must be definitely assigned
wargument
must be an "lvalue"
wref
required on argument and parameter
static void Method(ref Pair parameter)
{
parameter = new Pair(42,42);
}
static void Main()
{
Pair arg = null;
//Console.WriteLine(p.X);
Method(ref arg);
Console.WriteLine(arg.X);
}