Generic Delegate Types

Two generic delegate data types are available.
These have been introduced so you do not have to define your own.
Classes > Delegates > Generic Delegates


System.Action




System.Func

This delegate takes multiple input parameters (T1, T2, etc) and one output parameter (TResult)
In .NET 3.5 the following signatures were available.


public delegate TResult System.Func<out TResult>(T arg); 
public delegate TResult System.Func<in T, out TResult>(T arg);
public delegate TResult System.Func<in T1, T2, out TResult>(T arg);
public delegate TResult System.Func<in T1, T2, T3, out TResult>(T arg);
public delegate TResult System.Func<in T1, T2, T3, T4, out TResult>(T arg);




© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext