Difference between wiring events using “new EventHandler” and not using new EventHandler"?

后端 未结 4 819
情书的邮戳
情书的邮戳 2021-01-18 10:06

What\'s the difference between the two?

object.ProgressChanged += new EventHandler(object_ProgressChanged)

object.ProgressCh         


        
4条回答
  •  北海茫月
    2021-01-18 10:48

    No difference. The same ilcode is generated.

    As for which one is better: I use the second options since it's cleaner code = easier to read.

提交回复
热议问题