Class EnumerableTExtension
Provides extension methods for IEnumerable<T> to enhance and simplify operations on collections.
Namespace: Coree.NETStandard.Extensions
Assembly: Coree.NETStandard.dll
Syntax
public static class EnumerableTExtension
Remarks
This static class contains a collection of utility methods that extend the functionality of the IEnumerable<T> interface. These methods offer convenient ways to perform common operations on enumerable collections, such as filtering, transformation, and aggregation, with a focus on improving code readability and efficiency. This class is declared as partial to allow for easy extension and organization of its methods across multiple files, facilitating maintainability and scalability of the utility functions provided.
Methods
| Edit this page View SourceRemoveNullEntries<T>(IEnumerable<T?>)
Filters out null entries from an IEnumerable<T>.
Declaration
public static IEnumerable<T> RemoveNullEntries<T>(this IEnumerable<T?> enumerable) where T : class?
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | enumerable | The enumerable collection to filter. |
Returns
Type | Description |
---|---|
IEnumerable<T> | An IEnumerable<T> without null elements. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in the collection, constrained to reference types. |
Remarks
This extension method iterates over each element in the given enumerable, returning only those elements that are not null. It is applicable to collections of reference types.