Use this to reference shadowed member variables : this « Class « C# / CSharp Tutorial






using System;

class MyObject
{
    int x;
    int y;

    public MyObject(int x, int y)
    {
        this.x = x;
        this.y = y;
    }
}








7.10.this
7.10.1.Use this to reference shadowed member variables
7.10.2.Call Constructor in the same class using 'this'
7.10.3.implicit this
7.10.4.Invoke a constructor through this