Delegate
-
public delegate int TestDelegate(int c,int d); A delegate can reference a method only if the signature of the method exactly matches the signature specified by the delegate type. Mainly a delegate needs a signature.i.e..return type and input parameter datatype. Why i need to say the variable name with the datatype "int C & int D". Is MS is using this "int c & int D" internally. Suresh.P.S
-
public delegate int TestDelegate(int c,int d); A delegate can reference a method only if the signature of the method exactly matches the signature specified by the delegate type. Mainly a delegate needs a signature.i.e..return type and input parameter datatype. Why i need to say the variable name with the datatype "int C & int D". Is MS is using this "int c & int D" internally. Suresh.P.S
I agree, technically there is no need for variable names here; but C# expects them, and you can benefit in readability, especially if you also add /// comments for Intellisense. :)
Luc Pattyn