mscorlib(4.0.0.0) API with additions
System.Collections.ICollection Interface Reference

Defines size, enumerators, and synchronization methods for all nongeneric collections. More...

Inheritance diagram for System.Collections.ICollection:
[legend]
Collaboration diagram for System.Collections.ICollection:
[legend]

Public Member Functions

void CopyTo (Array array, int index)
 Copies the elements of the T:System.Collections.ICollection to an T:System.Array, starting at a particular T:System.Array index. More...
 
- Public Member Functions inherited from System.Collections.IEnumerable
IEnumerator GetEnumerator ()
 Returns an enumerator that iterates through a collection. More...
 

Properties

int Count [get]
 Gets the number of elements contained in the T:System.Collections.ICollection. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the T:System.Collections.ICollection. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe). More...
 

Detailed Description

Defines size, enumerators, and synchronization methods for all nongeneric collections.

Definition at line 8 of file ICollection.cs.

Member Function Documentation

◆ CopyTo()

void System.Collections.ICollection.CopyTo ( Array  array,
int  index 
)

Copies the elements of the T:System.Collections.ICollection to an T:System.Array, starting at a particular T:System.Array index.

Parameters
arrayThe one-dimensional T:System.Array that is the destination of the elements copied from T:System.Collections.ICollection. The T:System.Array must have zero-based indexing.
indexThe zero-based index in array at which copying begins.
Exceptions
T:System.ArgumentNullExceptionarray is null.
T:System.ArgumentOutOfRangeExceptionindex is less than zero.
T:System.ArgumentExceptionarray is multidimensional.-or- The number of elements in the source T:System.Collections.ICollection is greater than the available space from index to the end of the destination array .-or-The type of the source T:System.Collections.ICollection cannot be cast automatically to the type of the destination array .

Implemented in System.Collections.ArrayList, System.Array, System.Security.Policy.Evidence, System.Collections.Hashtable, System.Collections.SortedList, System.Collections.BitArray, System.Collections.Specialized.ListDictionary, System.ComponentModel.PropertyDescriptorCollection, System.Collections.Queue, System.Collections.Specialized.OrderedDictionary, System.Collections.Stack, System.ComponentModel.AttributeCollection, System.Collections.Specialized.HybridDictionary, System.Security.PermissionSet, System.Collections.Specialized.NameValueCollection, System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection, System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties, System.Net.CookieCollection, System.ComponentModel.TypeConverter.StandardValuesCollection, System.ComponentModel.ListSortDescriptionCollection, System.Configuration.SettingsPropertyCollection, System.Collections.DictionaryBase, System.Configuration.SettingsPropertyValueCollection, System.Text.RegularExpressions.MatchCollection, System.Text.RegularExpressions.GroupCollection, and System.Text.RegularExpressions.CaptureCollection.

Property Documentation

◆ Count

int System.Collections.ICollection.Count
get

Gets the number of elements contained in the T:System.Collections.ICollection.

Returns
The number of elements contained in the T:System.Collections.ICollection.

Definition at line 14 of file ICollection.cs.

◆ IsSynchronized

bool System.Collections.ICollection.IsSynchronized
get

Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe).

Returns
true if access to the T:System.Collections.ICollection is synchronized (thread safe); otherwise, false.

Definition at line 33 of file ICollection.cs.

◆ SyncRoot

object System.Collections.ICollection.SyncRoot
get

Gets an object that can be used to synchronize access to the T:System.Collections.ICollection.

Returns
An object that can be used to synchronize access to the T:System.Collections.ICollection.

Definition at line 23 of file ICollection.cs.


The documentation for this interface was generated from the following file: