Assuming I have the following delegate:
public delegate int TestD(int p);
Is there any difference between
TestD del = MyMethod;
and
TestD del = new TestD(MyMethod);
Assuming I have the following delegate:
public delegate int TestD(int p);
Is there any difference between
TestD del = MyMethod;
and
TestD del = new TestD(MyMethod);
No, there is no difference: starting with C# 2.0, you can specify delegates using a method group.
Note: In an unlikely case that you need 1.0 compatibility, the second syntax would be your only option.