its a good coding practice as it explicitly sets the scope and prevents bugs
private void InitializeComponent()
{
bool Load = true; // hides member variable
this.Load += new System.EventHandler(this.Page_Load); // this uses
member variable because it fully specified
}
-- bruce (sqlwork.com)
"Polaris" <et*******@hotmail.com> wrote in message
news:#h**************@tk2msftngp13.phx.gbl...
I noticed in the ASP.NET web application, as shown below, the "this"
pointer is used in the code generated by the Visual C# IDE. Anyone can explain why
it is necessary to use the "this" pointer here? Thanks!
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}