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
Action in .NET by examining how the C# compiler takes care of the
In .NET, a delegate defines a reference type that can be used to encapsulate a method ...