Interface ICollection
- Namespace
- System.Collections
- Assembly
- mscorlib.dll
Defines size, enumerators, and synchronization methods for all nongeneric collections.
public interface ICollection : IEnumerable
- Inherited Members
- Extension Methods
Properties
Count
Gets the number of elements contained in the ICollection.
int Count { get; }
Property Value
- int
The number of elements contained in the ICollection.
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
bool IsSynchronized { get; }
Property Value
- bool
true if access to the ICollection is synchronized (thread safe); otherwise, false.
SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
object SyncRoot { get; }
Property Value
- object
An object that can be used to synchronize access to the ICollection.
Methods
CopyTo(Array, int)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
void CopyTo(Array array, int index)