Share via


ObjectExtensions.EmptyIfNull<T>(IEnumerable<T>) 方法

定義

如果此列舉不是 Null,則傳回此列舉。 如果是 null,則傳回空列舉。

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

值的型別

參數

enumeration
IEnumerable<T>

列舉型別

傳回

result

適用於