当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - 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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: