Enumerable::DefaultIfEmpty Method
.NET Framework (current version)
Returns the elements of an IEnumerable<T>, or a default valued singleton collection if the sequence is empty.
Assembly: System.Core (in System.Core.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | DefaultIfEmpty<TSource>(IEnumerable<TSource>^) | Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. |
![]() ![]() | DefaultIfEmpty<TSource>(IEnumerable<TSource>^, TSource) | Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. |
Show:

