CollectionExtensions.IsNullOrEmpty Method
Whether the collection object is null or an empty collection. This element is introduced in Windows PowerShell 5.0.
Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)
Usage
'Usage
Dim collection As IEnumerable(Of T)
Dim returnValue As Boolean
returnValue = CollectionExtensions.IsNullOrEmpty(collection)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function IsNullOrEmpty(Of T) ( _
collection As IEnumerable(Of T) _
) As Boolean
[ExtensionAttribute]
public static bool IsNullOrEmpty<T> (
IEnumerable<T> collection
)
[ExtensionAttribute]
public:
generic<typename T>
static bool IsNullOrEmpty (
IEnumerable<T>^ collection
)
GenericParameters
- T
Parameters
- collection
The collection.
Return Value
Returns true if the specified collection is null or empty; otherwise false.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Target Platforms
See Also
Reference
CollectionExtensions Class
CollectionExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace