EnumerableExtensionsSelectWhereTSource, TResult Method

Project each element of a sequence into a new form if they fulfill a given condition.

Definition

Namespace: Karamba.Utilities
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
public static IEnumerable<TResult> SelectWhere<TSource, TResult>(
	this IEnumerable<TSource> source,
	TryFunc<TSource, TResult> function
)

Parameters

source  IEnumerableTSource
The sequence to filter and project.
function  TryFuncTSource, TResult
A transform function to apply to each element and test them for a condition.

Type Parameters

TSource
The type of the elements of source.
TResult
The type of the value returned by function.

Return Value

IEnumerableTResult
An IEnumerableT whose elements are the result of invoking the transform function on each element of source.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. 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).

See Also

copyright © 2024 Clemens Preisinger - Karamba3D. All rights reserved.