Adding delegate function vs adding new delegate to event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If we have:

public delegate void Test(string s);
public event Test testevent;
public void log(string s) {...}

What is the difference between:

testevent += log;

and

testevent += new Test(log);

I always used the former, but all the examples I'm encountering in
documentation use the latter. Is the former incorrect for any reason?
 
Back
Top