MoreEnumerableFromT(FuncT) Method

Returns a single-element sequence containing the result of invoking the function.

Definition

Namespace: MoreLinq
Assembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
C#
public static IEnumerable<T> From<T>(
	Func<T> function
)

Parameters

function  FuncT
The function to evaluate.

Type Parameters

T
The type of the object returned by the function.

Return Value

IEnumerableT
A sequence with the value resulting from invoking function.

Remarks

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

See Also