ConditionalWeakTable<TKey,TValue>.IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator Method

Definition

Returns an enumerator that can be used to iterate through the ConditionalWeakTable<TKey,TValue> table.

C#
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>> IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator();

Returns

IEnumerator<KeyValuePair<TKey,TValue>>

An enumerator that can be used to iterate through the ConditionalWeakTable<TKey,TValue> table.

Implements

Remarks

The returned enumerator does not extend the lifetime of any object pairs in the table, other than the current one. It does not return entries that have already been collected or that were added after the enumerator was retrieved. Additionally, it may not return all entries that were present when the enumerator was retrieved, for example, entries that were collected or removed after the enumerator was retrieved but before they were enumerated.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1