Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why create a new delegate object

Tags:

c#

.net

events

What is the advantage of using

_books.RowChanged +=new DataRowChangeEventHandler(_books_RowChanged);

which VS automatically inserts, vs. using

_books.RowChanged += _books_RowChanged;

which seems to me to be both shorter and more efficient.

like image 323
Baruch Avatar asked Dec 27 '22 17:12

Baruch


1 Answers

There is no difference except that second form is less verbose. They both do the same exact thing.

like image 119
Bala R Avatar answered Dec 30 '22 10:12

Bala R