© Vaskaran Sarcar 2020
V. SarcarGetting Started with Advanced C#https://doi.org/10.1007/978-1-4842-5934-4_1

1. Delegates

Vaskaran Sarcar1  
(1)
Kolkata, West Bengal, India
 

The concept of delegates is a very powerful feature in many programming languages, including C#. I believe that the discussion of advanced programming in C# cannot start without delegates. In this chapter, you learn about delegates and why they are essential.

Let’s recall the fundamentals of class and object. To create an object—let’s say, obA from a class A, you can write something like the following.
A obA=new A();

Here, the object reference obA points to an object of A. Similar to this, delegates are reference types, but the key difference is that they point to methods. Simply put, ...

Get Getting Started with Advanced C#: Upgrade Your Programming Skills now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.