本文介绍了是什么在C#中的委托和事件之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! This question I got at an interview and I still don't know what the answer should be.I would appreciate any thoughts! 解决方案 I have an article on pretty much exactlyIn brief, you can think of an event as being a bit like a property - but instead of having get/set operations, it has add/remove. The value being added/removed is always a delegate reference.Delegates themselves support operations of:Combine (chain multiple delegate instances together)Remove (split them up again)Invoke (synchronous or asynchronous)Various things to do with finding out the target, invocation list etcNote that delegates themselves are immutable, so combine/remove operations return a new delegate instance rather than modifying the existing ones. 这篇关于是什么在C#中的委托和事件之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-22 17:47