MoreEnumerableFromT Method (FuncT) |
Returns a single-element sequence containing the result of invoking the function.
Namespace:
MoreLinq
Assembly:
MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntax public static IEnumerable<T> From<T>(
Func<T> function
)
Public Shared Function From(Of T) (
function As Func(Of T)
) As IEnumerable(Of T)
public:
generic<typename T>
static IEnumerable<T>^ From(
Func<T>^ function
)
static member From :
function : Func<'T> -> IEnumerable<'T>
Parameters
- function
- Type: SystemFuncT
The function to evaluate.
Type Parameters
- T
- The type of the object returned by the function.
Return Value
Type:
IEnumerableTA 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