SortedDictionary<TKey,TValue>.Enumerator.IDictionaryEnumerator.Key Propriedade
Definição
Obtém a chave do elemento na posição atual do enumerador.Gets the key of the element at the current position of the enumerator.
property System::Object ^ System::Collections::IDictionaryEnumerator::Key { System::Object ^ get(); };
object System.Collections.IDictionaryEnumerator.Key { get; }
member this.System.Collections.IDictionaryEnumerator.Key : obj
ReadOnly Property Key As Object Implements IDictionaryEnumerator.Key
Valor da propriedade
A chave do elemento na coleção na posição atual do enumerador.The key of the element in the collection at the current position of the enumerator.
Implementações
Exceções
O enumerador é posicionado antes do primeiro elemento da coleção ou depois do último elemento.The enumerator is positioned before the first element of the collection or after the last element.
Comentários
IDictionaryEnumerator.Key é indefinido em qualquer uma das seguintes condições:IDictionaryEnumerator.Key is undefined under any of the following conditions:
O enumerador está posicionado antes do primeiro elemento da coleção.The enumerator is positioned before the first element of the collection. Isso acontece depois que um enumerador é criado ou depois que o IEnumerator.Reset método é chamado.That happens after an enumerator is created or after the IEnumerator.Reset method is called. O MoveNext método deve ser chamado para avançar o enumerador para o primeiro elemento da coleção antes de ler o valor da IDictionaryEnumerator.Key propriedade.The MoveNext method must be called to advance the enumerator to the first element of the collection before reading the value of the IDictionaryEnumerator.Key property.
A última chamada para MoveNext retornada
false, que indica o final da coleção e que o enumerador está posicionado após o último elemento da coleção.The last call to MoveNext returnedfalse, which indicates the end of the collection and that the enumerator is positioned after the last element of the collection.O enumerador é invalidado devido a alterações feitas na coleção, como adicionar, modificar ou excluir elementos.The enumerator is invalidated due to changes made in the collection, such as adding, modifying, or deleting elements.
IDictionaryEnumerator.Key Não move a posição do enumerador e chamadas consecutivas para IDictionaryEnumerator.Key retornar o mesmo objeto até que seja MoveNext ou IEnumerator.Reset seja chamado.IDictionaryEnumerator.Key does not move the position of the enumerator, and consecutive calls to IDictionaryEnumerator.Key return the same object until either MoveNext or IEnumerator.Reset is called.