Built-in delegates
In C#, not only are we able to declare a delegate, but we are also able to use the built-in delegate from the C# standard library. This built-in delegate also applies to the generic data type, so let's discuss the generic delegate prior to discussing the built-in delegate.
Generic delegates
A delegate type can use a generic type as its parameter. Using the generic type, we can put off the specification of one or more types in parameters or return values until the delegate is initialized into a variable. In other words, we do not specify the data types of the delegate's parameters and return values when we define a delegate type. To discuss this in more detail, let's take a look at the following code, which we can find at GenericDelegates.csproj ...
Get Functional C# 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.