delegate 和 观察者模式

realljx 2005-04-12 01:59:38
delegate是否是 完全实现了 观察者模式(observer)?

两者的区别在哪里?
...全文
97 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
realljx 2005-04-13
  • 打赏
  • 举报
回复
思规大哥 不同凡人啊 整个MSDN都牢记于心了。

景仰中。
saucer 2005-04-12
  • 打赏
  • 举报
回复
see "Observer" in Enterprise Solution Patterns Using Microsoft .NET

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/DesObserver.asp

The event and delegate features in the .NET Framework implement this approach as a language construct so that you do not even have to implement your own ConcreteSubject classes anymore. Basically, events replace the ConcreteSubject classes, and delegates implement the role of the Observer interface.

13,190

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 分析与设计
社区管理员
  • 分析与设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧