PkmnLib.NET/PkmnLib.Static/Utils/EnumerableHelpers.cs

7 lines
222 B
C#
Raw Normal View History

2024-07-28 12:00:26 +00:00
namespace PkmnLib.Static.Utils;
public static class EnumerableHelpers
{
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> enumerable) where T : class =>
enumerable.Where(x => x is not null)!;
}