Queryable.DefaultIfEmpty Method

 

Returns the elements in a sequence or a default valued singleton collection if the sequence is empty.

Namespace:   System.Linq
Assembly:  System.Core (in System.Core.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDefaultIfEmpty<TSource>(IQueryable<TSource>)

Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.

System_CAPS_pubmethodSystem_CAPS_staticDefaultIfEmpty<TSource>(IQueryable<TSource>, TSource)

Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.

Return to top
Show: