\IEnumerator

Supports a simple iteration over a non-generic collection. And Provides a set of static (Shared in ``Visual Basic``) methods for querying objects that implement ``System.Collections.Generic.IEnumerable<T>``.

Summary

Methods
Properties
Constants
Count()
__construct()
Where()
Select()
GroupBy()
OrderBy()
OrderByDescending()
Take()
Skip()
SkipWhile()
Range()
Distinct()
All()
Any()
SequenceEquals()
Reverse()
First()
Last()
Sum()
Average()
Min()
Max()
Aggregate()
ToArray()
ToList()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$sequence
N/A

Properties

$sequence

$sequence : Array

Type

Array

Methods

Count()

Count(  $assert = null) : integer

Returns the number of elements in a sequence. Or returns a number that represents how many elements in the specified sequence satisfy a condition if the ``assert`` is not null.

Parameters

$assert

Returns

integer —

Returns the count of the target sequence.

__construct()

__construct(array  $source) 

Parameters

array $source

Where()

Where(  $predicate) : \IEnumerator

Parameters

$predicate

Returns

\IEnumerator

Select()

Select(  $project) : \IEnumerator

Parameters

$project

Returns

\IEnumerator

GroupBy()

GroupBy(  $keySelector) : \IEnumerator

Parameters

$keySelector

Returns

\IEnumerator

OrderBy()

OrderBy(  $keySelector) : \IEnumerator

Parameters

$keySelector

Returns

\IEnumerator

OrderByDescending()

OrderByDescending(  $keySelector) : \IEnumerator

Parameters

$keySelector

Returns

\IEnumerator

Take()

Take(  $n) : \IEnumerator

Parameters

$n

Returns

\IEnumerator

Skip()

Skip(  $n) : \IEnumerator

Parameters

$n

Returns

\IEnumerator

SkipWhile()

SkipWhile(\function  $predicate) : \IEnumerator

Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.

Parameters

\function $predicate

A function to test each element for a condition.

Returns

\IEnumerator

An System.Collections.Generic.IEnumerable<T> that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

Range()

Range(integer  $start, integer  $count) : \IEnumerator

Generates a subset sequence of object within a specified range.

Parameters

integer $start

The value of the first integer in the sequence.

integer $count

The number of sequential integers to generate.

Returns

\IEnumerator

Distinct()

Distinct(\function  $keySelector = null) : \IEnumerator

Returns distinct elements from a sequence by using a specified ``System.Collections.Generic.IEqualityComparer<T>`` to compare values.

Parameters

\function $keySelector

An System.Collections.Generic.IEqualityComparer<T> to compare values.

Returns

\IEnumerator

An System.Collections.Generic.IEnumerable<T> that contains distinct elements from the source sequence.

All()

All(\function  $predicate) : boolean

Determines whether all elements of a sequence satisfy a condition.

Parameters

\function $predicate

A function to test each element for a condition.

Returns

boolean —

true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.

Any()

Any(\function  $predicate) : boolean

Determines whether any element of a sequence satisfies a condition.

Parameters

\function $predicate

A function to test each element for a condition.

Returns

boolean —

true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.

SequenceEquals()

SequenceEquals(array  $another, \function  $compares = null) : boolean

Determines whether two sequences are equal by comparing their elements by using a specified ``System.Collections.Generic.IEqualityComparer<T>``.

Parameters

array $another

An System.Collections.Generic.IEnumerable<T> to compare to the first sequence.

\function $compares

An System.Collections.Generic.IEqualityComparer<T> to use to compare elements.

Returns

boolean —

true if the two source sequences are of equal length and their corresponding elements compare equal according to comparer; otherwise, false.

Reverse()

Reverse() : \IEnumerator

Inverts the order of the elements in a sequence.

Returns

\IEnumerator

A sequence whose elements correspond to those of the input sequence in reverse order.

First()

First(\function  $predicate = null) 

Returns the first element of a sequence.

Parameters

\function $predicate

If this parameter is not null, then returns the first element in a sequence that satisfies a specified condition.

Last()

Last(\function  $predicate = null) 

Returns the last element of a sequence.

Parameters

\function $predicate

If this parameter is not null, then returns the last element of a sequence that satisfies a specified condition.

Sum()

Sum(  $cast = null) 

Parameters

$cast

Average()

Average(  $cast = null) 

Parameters

$cast

Min()

Min(  $keySelector = null) 

Parameters

$keySelector

Max()

Max(  $keySelector = null) 

Parameters

$keySelector

Aggregate()

Aggregate(  $func) 

Applies an accumulator function over a sequence.

Parameters

$func

ToArray()

ToArray() : array

Copies the elements of the System.Collections.ArrayList to a new System.Object array.

Returns

array —

An System.Object array containing copies of the elements of the System.Collections.ArrayList.

ToList()

ToList() : \ArrayList

Creates a System.Collections.Generic.List<T> from an System.Collections.Generic.IEnumerable<T>.

Returns

\ArrayList

A System.Collections.Generic.List that contains elements from the input sequence.