ObjectExtensions.EmptyIfNull<T>(IEnumerable<T>) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果枚举不为 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>
枚举
返回
IEnumerable<T>
result