Our great sponsors
-
Roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
/// /// Filters a sequence of values based on whether the value is null. /// /// An to filter. /// The type of the elements of . /// An that contains elements from the input sequence that are not null. /// /// See for more details. /// public static IEnumerable WhereNotNull(this IEnumerable source) { // Apparently query syntax works, but method chaining gives a nullability warning. // From: https://github.com/dotnet/roslyn/issues/37468#issuecomment-681977382. return from item in source where item != null select item; }