EnumerableExtensionsSelectWhereTSource, TResult Method
Project each element of a sequence into a new form if they fulfill a given condition.
Namespace: Karamba.UtilitiesAssembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
public static IEnumerable<TResult> SelectWhere<TSource, TResult>(
this IEnumerable<TSource> source,
TryFunc<TSource, TResult> function
)
<ExtensionAttribute>
Public Shared Function SelectWhere(Of TSource, TResult) (
source As IEnumerable(Of TSource),
function As TryFunc(Of TSource, TResult)
) As IEnumerable(Of TResult)
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static IEnumerable<TResult>^ SelectWhere(
IEnumerable<TSource>^ source,
TryFunc<TSource, TResult>^ function
)
[<ExtensionAttribute>]
static member SelectWhere :
source : IEnumerable<'TSource> *
function : TryFunc<'TSource, 'TResult> -> IEnumerable<'TResult>
- 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.
- TSource
- The type of the elements of source.
- TResult
- The type of the value returned by function.
IEnumerableTResult
An
IEnumerableT whose elements are the result of invoking the transform function on each element of
source.
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).