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

适用于