有一些概念是看过一次记得,久不接触就忘了的,但是以后要重新捡起,又要花些时间看书,所以记下来为了巩固。
1. 申明Deleagate:其实背后是IL编译器为你创造了一个封装函数指针的类,这个类名就是你申明时所用的函数名,例如Delegate void AddDelegate(int, int)。winForm技术中喜欢将AddDelegate称为AddEventHandler,所以也就有了那么多EventHandler。
2. 申明Event::当Event和前面申明的委托,也就是AddEventHandler联合申明一个事件,例如 public event AddEventHandler addevent, 这个IL编译出来的的是包含函数指针列表的类实例。而addevent()调用,就变成函数列表的调用,官方文字称诸多订阅该事件的委托实例的调用。所以订阅的语句:addevent+= new AddEventHandler(clientDimAdd) ,也就是将这个回调函数加入到列表中,以便事件触发时依次调用。
https://basescan-basescan.github.io/
https://baesscan.webflow.io/
https://arbicsan.github.io/
https://bscsacn.github.io/
https://mempoolspace-btc.github.io/
https://mempol-space.github.io/
https://cow-swap-fi.github.io/
https://arbiscan-explorer.github.io/
https://baesscan.github.io/
https://gmgn-ai-gmgnai.github.io/
https://swapcow-cowswap.github.io/
https://arkm-arkham.github.io/
https://arkham-arkm.github.io/
https://ethesrcan.github.io/
https://solsacn-io.github.io/
https://etherscan-bit.github.io/
https://solscan-solan.github.io/
https://etherscan-ie.github.io/
https://etherscan-explorer.webflow.io/
https://solsacn-io.github.io/
https://solcsan-io.github.io/
https://ethersacn-io.github.io/
https://basecsan-io.github.io/
https://abriscan-io.github.io/
https://blockhcair-io.github.io/