December 2012
Intermediate to advanced
612 pages
14h 4m
English
![]()
This chapter will discuss delegates. First, we will examine the C# delegate compared to the function pointer in C language, which will give you a basic idea of the similarity between the function pointer in C and delegate in .NET. This will also build a background knowledge about the function pointer, which will help you understand the internal working of delegates. Finally, you will explore generic delegates such as Func and Action in .NET by examining how the C# compiler takes care of the Func and Action delegates.
In .NET, a delegate defines a reference type that can be used to encapsulate a method ...