December 31st, 2012, 05:02 AM
How are instance methods converted to delegates
It seems simple enough how static methods are invoked in delegates, as all of their parameters will be passed to them when the delegate itself is invoked.
However when an instance method is added to a delegate, the 'this' parameter is seemingly ignored during the invocation of the delegate, and so I can only imagine that it is saved alongside the delegate itself - similar to what a closure can do with other parameters.
Will a closure be created by the compiler when an instance method is passed to a delegate, or is there a different mechanism by which this is accomplished?