Jonathan M Davis:

The prime example is constructors.

this(int a, string b)
{
 this.a = a;
 this.b = b;
 ...
}

That example of yours shows a possible intermediate rule: when in a method you define a local variable that has the same name as an instance member, then the instance member must be referred with the "this." prefix inside that function. So that code will compile.

Bye,
bearophile

Reply via email to