ConditionalWeakTable<TKey,TValue>.IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator 方法

定义

返回一个可用于循环访问 ConditionalWeakTable<TKey,TValue> 表的枚举器。Returns an enumerator that can be used to iterate through the ConditionalWeakTable<TKey,TValue> table.

 virtual System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>.GetEnumerator() = System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>>::GetEnumerator;
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>> IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator ();
abstract member System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<'Key, 'Value>>
override this.System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<'Key, 'Value>>
Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of TKey, TValue)) Implements IEnumerable(Of KeyValuePair(Of TKey, TValue)).GetEnumerator

返回

IEnumerator<KeyValuePair<TKey,TValue>>

一个可用于循环访问 ConditionalWeakTable<TKey,TValue> 表的枚举器。An enumerator that can be used to iterate through the ConditionalWeakTable<TKey,TValue> table.

实现

注解

返回的枚举器不会扩展表中除当前表之外的任何对象对的生存期。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.

适用于