Skip to content

M_CodeJam_Collections_ArrayExtensions_Any__1

Andrew Koryavchenko edited this page Jun 17, 2018 · 6 revisions

ArrayExtensions.Any(T) Method

Checks if any element in array exists.

Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static bool Any<T>(
	this T[] array
)

VB

<ExtensionAttribute>
Public Shared Function Any(Of T) ( 
	array As T()
) As Boolean

F#

[<ExtensionAttribute>]
static member Any : 
        array : 'T[] -> bool 

Parameters

 

array
Type: T[]
Array to check.

Type Parameters

 

T
Type of array item.

Return Value

Type: Boolean
True, if array is not empty.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method performs fast check instead of creating enumerator

See Also

Reference

ArrayExtensions Class
CodeJam.Collections Namespace

Clone this wiki locally