ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Add Método

Definição

Gera uma exceção NotSupportedException em todos os casos.

 virtual void System.Collections.Generic.ICollection<TKey>.Add(TKey item) = System::Collections::Generic::ICollection<TKey>::Add;
void ICollection<TKey>.Add (TKey item);
abstract member System.Collections.Generic.ICollection<TKey>.Add : 'Key -> unit
override this.System.Collections.Generic.ICollection<TKey>.Add : 'Key -> unit
Sub Add (item As TKey) Implements ICollection(Of TKey).Add

Parâmetros

item
TKey

O objeto a ser adicionado à coleção.

Implementações

Exceções

Em todos os casos.

Comentários

Este membro é uma implementação do membro de interface explícita. Ele só pode ser usado quando a instância de ReadOnlyDictionary<TKey,TValue>.KeyCollection é convertida em uma interface de ICollection<T>. A ICollection<T> interface especifica que o Add método deve gerar uma NotSupportedException exceção se a coleção que implementa a interface for somente leitura.

Aplica-se a