ListExtensions.FirstNonNull<T>
Extension Method in ListExtensions
Declaration
public static T FirstNonNull<T>(this List<T> list)
where T : class
Description
Returns the first non-null item in the list.
Type Parameters
T | The type of the list. |
Parameters
list | The list to get the item from. |
Returns
T | The first non-null item in the list, or default(T) if all items are null. |