When we create a delegate in C#, to point a function with a definite signature (parameter set), it asks us to specify the identifier also 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 saying identifier expected.
But according to me, when we are just specifying the prototype for the method, why compiler needs an identifier to distinguish between two methods with different signature:
public delegate void firstDelegate(int);
and
public delegate void secondDelegate(int, int);
are the sufficient and clear declaration to distinguish between them. I think so
I think you people got me??
System.Action<int,int>. Don't try to reinvent the wheel.System.Action<...>.delegate NetEventHandler(Socket sock, NetEvent event)much more readable, thanSystem.Action<Socket,NetEvent>