ObjectExtensions.EmptyIfNull<T>(IEnumerable<T>) Méthode
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne cette énumération au cas où elle n’est pas null. Si elle est null, retourne l’énumération vide.
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 des valeurs
- enumeration
- IEnumerable<T>
énumération
IEnumerable<T>
result
Produit | Versions |
---|---|
Visual Studio SDK | 2019, 2022 |