You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> list) where T : struct
{
foreach (var item in list)
if (item != null)
yield return item.Value;
}
There are a couple of workarounds - you can use Nullable<T>, or this alternate syntax:
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<@`'?`<T>> list) where T : struct
The text was updated successfully, but these errors were encountered:
This gives a syntax error:
There are a couple of workarounds - you can use
Nullable<T>
, or this alternate syntax:The text was updated successfully, but these errors were encountered: