LockingCollectionTGetEnumerator Method

Returns an enumerator that iterates through the collection.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public IEnumerator<T> GetEnumerator()

Return Value

IEnumeratorT
An enumerator that can be used to iterate through the collection.

Implements

IEnumerableTGetEnumerator

Remarks

The enumeration represents a moment-in-time snapshot of the contents of the LockingCollectionT. It does not reflect any updates to the collection after GetEnumerator was called. The enumerator is safe to use concurrently with reads from and writes to the collection.

This method has an O(n) cost where n is the number of elements in the collection.

See Also