I wish to whether my understanding is correct.
Problem pro = new Problem();
"pro" can be an object, instance or variable, in delegates it can be referred to method as well. That means "pro" can take several roles depending on the situation.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 4, 2015, 10:14 AM
If Problem is a reference type, then 'pro' contains a reference to where a new object (or instance) of type Problem has been created on the heap.
However, if Problem is a value type, then 'pro' contains an actual instance of that type, not a reference to it.
As you say, it is also possible for variables to refer to delegate instances and there is special syntax for adding compatible methods to, or removing them from, the invocation list of that delegate instance.
All the methods can then be invoked, one after the other, by invoking the delegate.
MahaPosted Mar 5, 2015, 9:37 AM