Introduction
Abstraction problems of methods and functions
How to declare a delegate?
Solving the abstract pointer problem using delegates
Multicast delegates
Simple demonstration of multicast delegates
Problem with multicast delegates – naked exposure
Events – Encapsulation on delegates
Implementing events
Difference between delegates and events
Delegates for Asynchronous method calls
Summarizing Use of delegates
Difference between delegates and C++ pointer
Source code
In case you do not want to read my complete article , you can watch the below video for the same.
IntroductionIn this article we will first try to understand what problem delegate solves, we will then create a simple delegate and try to solve the problem. Next we will try to understand the concept of multicast delegates and how events help to encapsulate delegates. Finally we understand the difference between events and delegates and also understand how to do invoke delegates asynchronously. Once we are done with all fundamentals we will summarize the six important uses of delegates.This is a small Ebook for all my .NET friends which covers topics like WCF,WPF,WWF,Ajax,Core .NET,SQL etc you can download the same from here
or else you can catch me on my daily free training @ from here Abstraction problems of methods and functionsBefore we move ahead and we talk about delegates let’s try to understand what problem does delegate solve. Below is a simple class named ‘ClsMaths’ which has a simple ‘Add’ function. This class ‘ClsMaths’ is consumed by a simple UI client. Now let’s say over a period of time you add subtraction functionality to the ‘ClsMaths’ class, your client need to change accordingly to accommodate the new functionality. Read more: Codeproject
Abstraction problems of methods and functions
How to declare a delegate?
Solving the abstract pointer problem using delegates
Multicast delegates
Simple demonstration of multicast delegates
Problem with multicast delegates – naked exposure
Events – Encapsulation on delegates
Implementing events
Difference between delegates and events
Delegates for Asynchronous method calls
Summarizing Use of delegates
Difference between delegates and C++ pointer
Source code
In case you do not want to read my complete article , you can watch the below video for the same.
IntroductionIn this article we will first try to understand what problem delegate solves, we will then create a simple delegate and try to solve the problem. Next we will try to understand the concept of multicast delegates and how events help to encapsulate delegates. Finally we understand the difference between events and delegates and also understand how to do invoke delegates asynchronously. Once we are done with all fundamentals we will summarize the six important uses of delegates.This is a small Ebook for all my .NET friends which covers topics like WCF,WPF,WWF,Ajax,Core .NET,SQL etc you can download the same from here
or else you can catch me on my daily free training @ from here Abstraction problems of methods and functionsBefore we move ahead and we talk about delegates let’s try to understand what problem does delegate solve. Below is a simple class named ‘ClsMaths’ which has a simple ‘Add’ function. This class ‘ClsMaths’ is consumed by a simple UI client. Now let’s say over a period of time you add subtraction functionality to the ‘ClsMaths’ class, your client need to change accordingly to accommodate the new functionality. Read more: Codeproject
0 comments:
Post a Comment