well i am quite confused aboutt his "delegate" thing.
i have seen some examples like this.
public delegate int DelegateToMethod(int x, int y);
class math
{
public static int Add(int first, int second)
{
return first + second;
}
}
and then the guy was using it like this on his code:
DelegateToMethod adelegate = new DelegateToMethod(math.Add);
textBox1.Text = adelegate(2, 5).ToString();
but why in earth we have to call that static methd thru delegate? we can easly call it directly without the need for delegates...
any idea?
...
Go to the complete details ...