Baruch
Baruch

Reputation: 21508

Why create a new delegate object

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.

Upvotes: 4

Views: 84

Answers (1)

Bala R
Bala R

Reputation: 108947

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

Upvotes: 10

Related Questions