Share via


ObjectExtensions.EmptyIfNull<T>(IEnumerable<T>) Method

Definition

Return this enumeration in case it is not null. In case it is null return empty enumeration.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ EmptyIfNull(System::Collections::Generic::IEnumerable<T> ^ enumeration);
public static System.Collections.Generic.IEnumerable<T> EmptyIfNull<T> (this System.Collections.Generic.IEnumerable<T> enumeration);
static member EmptyIfNull : seq<'T> -> seq<'T>
<Extension()>
Public Function EmptyIfNull(Of T) (enumeration As IEnumerable(Of T)) As IEnumerable(Of T)

Type Parameters

T

type of the values

Parameters

enumeration
IEnumerable<T>

enumeration

Returns

result

Applies to