T
Tony Johansson
Hi!
At the bottom of this document is some text from the MSDN documentation.
As I have tested and read about delegate the method that is going to be
added to the delegate must be identical as the delegate.
So why does the MSDN documentation write "When you instantiate a delegate,
you can associate its instance with any method with a compatible signature."
I made a test defining a delegate like this delegete void
myDelegateTest(object o);
and tried to add a method with this signature public void Test(int i){}
but that didn't work becuase of the signature
A delegate is a type that defines a method signature. When you instantiate a
delegate, you can associate its instance with any method with a compatible
signature.
//Tony
At the bottom of this document is some text from the MSDN documentation.
As I have tested and read about delegate the method that is going to be
added to the delegate must be identical as the delegate.
So why does the MSDN documentation write "When you instantiate a delegate,
you can associate its instance with any method with a compatible signature."
I made a test defining a delegate like this delegete void
myDelegateTest(object o);
and tried to add a method with this signature public void Test(int i){}
but that didn't work becuase of the signature
A delegate is a type that defines a method signature. When you instantiate a
delegate, you can associate its instance with any method with a compatible
signature.
//Tony