1
This commit is contained in:
16
Core/Extensions/Linq.cs
Normal file
16
Core/Extensions/Linq.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public static partial class Extensions
|
||||
{
|
||||
public static IEnumerable<TResult> SelectWhere<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
|
||||
{
|
||||
return source.Where(x => selector.Invoke(x) is not null).Select(x => selector.Invoke(x));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user