Delegate Func<T, TResult>
Encapsulates a method that has one parameter and returns a value of the type specified by the TResult
parameter.
Assembly: mscorlib.dll
Syntax
public delegate TResult Func<in T, out TResult>(T arg)
Parameters
Type |
Name |
Description |
T |
arg |
The parameter of the method that this delegate encapsulates.
|
Returns
Type |
Description |
TResult |
The return value of the method that this delegate encapsulates.
|
Type Parameters
Name |
Description |
T |
The type of the parameter of the method that this delegate encapsulates.
This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
|
TResult |
The type of the return value of the method that this delegate encapsulates.
This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
|
Constructors
Func(object, IntPtr)
Declaration
public Func(object @object, IntPtr method)
Parameters
Methods
BeginInvoke(T, AsyncCallback, object)
Declaration
public virtual IAsyncResult BeginInvoke(T arg, AsyncCallback callback, object @object)
Parameters
Returns
EndInvoke(IAsyncResult)
Declaration
public virtual TResult EndInvoke(IAsyncResult result)
Parameters
Returns
Invoke(T)
Declaration
public virtual TResult Invoke(T arg)
Parameters
Type |
Name |
Description |
T |
arg |
|
Returns
Extension Methods