When we create a delegate in C # to indicate a function with a specific signature (set of parameters), it asks for an identifier for each type.
public delegate void myDelegate(int x, int y);
if I try to write this prototype declaration as:
public delegate void myDelegate(int, int)
it shows a compile-time error by saying identifier expected.
But for me, when we simply indicate the prototype of the method, why does the compiler need an identifier to distinguish between two methods with different signatures:
public delegate void firstDelegate(int);
and
public delegate void secondDelegate(int, int);
are a sufficient and clear expression of the difference between them. I think so
I think you got me?
source
share