c# - Which object does `this` refer to inside an event handler? -


does refer object handler defined in or object handle belongs to:

example:

class foo   {  object a;  public foo()  {   a.handle += function;      }   void function()  {        this;<--what "this" refer foo or object a?  }     } 

this refers foo. in c# this pointer refers instance of class containing method


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -