Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?>)

Declaration

public static IEnumerable<T> WhereNotNull<T>(
    this IEnumerable<T?> src
)

Summary

Returns only the non-null elements from the specified collection of nullable values as non-nullable values.

Generic type parameters

T
  • Must derive from: System.ValueType.
  • Must have a default constructor.
  • Must be a non-nullable value type.
The inner value type.

Parameters

this IEnumerable<T?>src A collection of nullable values.

Returns

A collection containing only those values that aren’t null.