码迷,mamicode.com
首页 > Windows程序 > 详细

C# for Beginner session 31 to 44

时间:2015-01-16 01:07:09      阅读:307      评论:0      收藏:0      [点我收藏+]

标签:

Part 31 - C# Tutorial - Explicit interfaces implementation

技术分享

技术分享

Part 32 - C# Tutorial - Abstract classes in c#

技术分享

Part 33 - C# Tutorial - Difference between abstract classes and interfaces

技术分享

Part 34 - C# Tutorial - Problems of multiple class inheritance

技术分享

Part 35 - C# Tutorial - Multiple class inheritance using interfaces

技术分享

Part 36 - C# Tutorial - Delegates in c#

技术分享

 

技术分享

Part 37-38 - C# Tutorial - Delegates usage in c#

Part 39   C# Tutorial   Multicast Delegates in C#

A Multicast delegate is a delegate that has references to more than one function.When you invoke a multicast delegate, all the function the delegate is pointing to , are invoked.

There are 2 approaches to create a multicast delegate. Depending on the approach you use + or += to register a method with delegate

-or -=to un-register a method with the delegate

Note: A multicast delegate, invokes the methods in the invocation list, in the same order in which they are added.

if the delegate has a return type other than void and if the delegate is a multicast delegate, only the value of the last invoked method will be returned. Along the same lines, if the delegate has an out parameter, the value of the output parameter, will be the value assigned by the last method.

Common interview question - where do you use multicast delegates?

Multicast delegate makes implementation of observer(观察者) design pattem(模式) very simple. observer pattem is also called as publish/subscribe(订阅) pattem.

Part 40 to 44 is talk about exception

 

C# for Beginner session 31 to 44

标签:

原文地址:http://www.cnblogs.com/gester/p/4214605.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!