EvaluateExtensionEvaluateT Method

Returns a sequence containing the values resulting from invoking (in order) each function in the source sequence of functions.

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.1.0+0e154ef592f33ce0f6f3d534a9eedee273f0ce72
C#
public static IEnumerable<T> Evaluate<T>(
	this IEnumerable<Func<T>> functions
)

Parameters

functions  IEnumerableFuncT
The functions to evaluate.

Type Parameters

T
The type of the object returned by the functions.

Return Value

IEnumerableT
A sequence with results from invoking functions.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableFuncT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This operator uses deferred execution and streams the results. If the resulting sequence is enumerated multiple times, the functions will be evaluated multiple times too.

Exceptions

ArgumentNullExceptionWhen functions is null.

See Also