Table of Contents

Delegate Func<T, TResult>

Namespace
System
Assembly
mscorlib.dll

Encapsulates a method that has one parameter and returns a value of the type specified by the TResult parameter.

public delegate TResult Func<in T, out TResult>(T arg)

Parameters

arg T

The parameter of the method that this delegate encapsulates.

Returns

TResult

The return value of the method that this delegate encapsulates.

Type Parameters

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.

Extension Methods

Constructors

Func(object, IntPtr)

public Func(object @object, IntPtr method)

Parameters

object object
method IntPtr

Methods

BeginInvoke(T, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(T arg, AsyncCallback callback, object @object)

Parameters

arg T
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual TResult EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Returns

TResult

Invoke(T)

public virtual TResult Invoke(T arg)

Parameters

arg T

Returns

TResult