[This is preliminary documentation and is subject to change.]
Gets value indicating if given collection is non-empty
Namespace: Tools.LinqTAssembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
public static bool Exists( this IEnumerable collection ) |
| Visual Basic |
|---|
<ExtensionAttribute> _ Public Shared Function Exists ( _ collection As IEnumerable _ ) As Boolean |
| Visual C++ |
|---|
[ExtensionAttribute] public: static bool Exists( IEnumerable^ collection ) |
| F# |
|---|
static member Exists : collection:IEnumerable -> bool |
| JScript |
|---|
public static function Exists( collection : IEnumerable ) : boolean |
Parameters
- collection
- Type: System.Collections..::..IEnumerable
Collection to check non-emptyness of
Return Value
True if first element of collection can be enumerated using collection.GetEnumerator.MoveNext.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | collection is null |
See Also
Version History
1.5.3
- This function is new in version 1.5.3