System::Collections::Generic::ICollection class

ICollection class

Interface of collection of elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

template<typename T>class ICollection : public virtual System::Collections::Generic::IEnumerable<T>

Methods

MethodDescription
virtual Add(const T&)Adds element into collection.
virtual Clear()Deletes all elements from collection.
virtual Contains(const T&) constChecks if element is present in collection.
virtual CopyTo(System::ArrayPtr<T>, int)Copies all collection elements to existing array elements.
virtual get_Count() constGets number of elements in collection.
virtual get_IsReadOnly() constChecks if collection is read only.
get_SyncRoot() constGets the object the collection is being synchronized through.
ICollection()Default constructor.
ICollection(const ICollection&)Copy constructor.
ICollection(ICollection&&)Move constructor.
operator=(ICollection&&)Move assignment operator.
operator=(const ICollection&)Move assignment operator.
virtual Remove(const T&)Deletes element from collection.
virtual ~ICollection()Destructor.

Typedefs

TypedefDescription
ValueTypeRTTI information.
ThisTypeCollection type name.

See Also