ObjectExtensions.EmptyIfNull<T>(IEnumerable<T>) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
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)
- T
type of the values
- enumeration
- IEnumerable<T>
enumeration
IEnumerable<T>
result
Proizvod | Verzije |
---|---|
Visual Studio SDK | 2019, 2022 |