Skip to content

ICollection<T>

ICollection

ICollection is an interface for implementing generic data collections.

Description

The ICollection interface determines basic methods to work with collections, including methods to count elements, to clear a collection, to add or delete elements, and others.

Declaration

template<typename T>
   interface ICollection

Header

#include <Generic\Interfaces\ICollection.mqh>

Inheritance Hierarchy

ICollection

Direct descendants

: CLinkedList, CQueue, CRedBlackTree, CStack, IList, IMap, ISet

Class Methods

MethodDescription
AddAdds an element to a collection
CountReturns the number of elements in a collection
ContainsDetermines whether a collection contains an element with the specified value
CopyToCopies all elements of a collection to the specified array starting at the specified index
ClearRemoves all elements from a collection
RemoveRemoves the first occurrence of the specified element from a collection
Last updated on