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

Definition

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

C++
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ EmptyIfNull(System::Collections::Generic::IEnumerable<T> ^ enumeration);

Type Parameters

T

type of the values

Parameters

enumeration
IEnumerable<T>

enumeration

Returns

result

Applies to

Proizvod Verzije
Visual Studio SDK 2019, 2022