System.Collections.Specialized Namespace
Contém coleções especializadas e fortemente tipadas; por exemplo, um dicionário de lista vinculada, um vetor de bits e coleções que contêm somente cadeias de caracteres. Contains specialized and strongly-typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
Classes
| CollectionChangedEventManager |
Fornece uma implementação WeakEventManager para que seja possível usar o padrão “ouvinte de eventos fraco” para anexar ouvintes ao evento CollectionChanged.Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the CollectionChanged event. |
| CollectionsUtil |
Cria coleções que ignoram maiúsculas e minúsculas em cadeias de caracteres.Creates collections that ignore the case in strings. |
| HybridDictionary |
Implementa |
| ListDictionary |
Implementa |
| NameObjectCollectionBase |
Fornece uma classe base de |
| NameObjectCollectionBase.KeysCollection |
Representa uma coleção de chaves String de uma coleção.Represents a collection of the String keys of a collection. |
| NameValueCollection |
Representa uma coleção de chaves String e valores String associados que podem ser acessados com a chave ou com o índice.Represents a collection of associated String keys and String values that can be accessed either with the key or with the index. |
| NotifyCollectionChangedEventArgs |
Fornece dados para o evento de CollectionChanged .Provides data for the CollectionChanged event. |
| OrderedDictionary |
Representa uma coleção de pares chave/valor que são acessíveis por chave ou índice.Represents a collection of key/value pairs that are accessible by the key or index. |
| StringCollection |
Representa uma coleção de cadeias de caracteres.Represents a collection of strings. |
| StringDictionary |
Implementa uma tabela de hash com a chave e o valor fortemente tipado sendo cadeias de caracteres em vez de objetos.Implements a hash table with the key and the value strongly typed to be strings rather than objects. |
| StringEnumerator |
Dá suporte a uma iteração simples em um StringCollection.Supports a simple iteration over a StringCollection. |
Estruturas
| BitVector32 |
Fornece uma estrutura simples que armazena valores booleanos e inteiros pequenos em 32 bits de memória.Provides a simple structure that stores Boolean values and small integers in 32 bits of memory. |
| BitVector32.Section |
Representa uma seção do vetor que pode conter um número inteiro.Represents a section of the vector that can contain an integer number. |
Interfaces
| INotifyCollectionChanged |
Notifica os ouvintes de alterações dinâmicas, como quando um item é adicionado e removido ou toda a lista é limpa.Notifies listeners of dynamic changes, such as when an item is added and removed or the whole list is cleared. |
| IOrderedDictionary |
Representa uma coleção indexada de pares chave/valor.Represents an indexed collection of key/value pairs. |
Enumerações
| NotifyCollectionChangedAction |
Descreve a ação que causou um evento CollectionChanged.Describes the action that caused a CollectionChanged event. |
Delegados
| NotifyCollectionChangedEventHandler |
Representa o método que manipula o evento CollectionChanged.Represents the method that handles the CollectionChanged event. |
Comentários
Coleções especializadas são coleções com finalidades altamente específicas.Specialized collections are collections with highly specific purposes. NameValueCollection é baseado em NameObjectCollectionBase ; no entanto, NameValueCollection aceita vários valores por chave, enquanto NameObjectCollectionBase aceita apenas um valor por chave.NameValueCollection is based on NameObjectCollectionBase; however, NameValueCollection accepts multiple values per key, whereas NameObjectCollectionBase accepts only one value per key.
Algumas coleções com rigidez de tipos no System.Collections.Specialized namespace são StringCollection e StringDictionary , ambas contêm valores que são exclusivamente cadeias de caracteres.Some strongly typed collections in the System.Collections.Specialized namespace are StringCollection and StringDictionary, both of which contain values that are exclusively strings.
A CollectionsUtil classe cria instâncias de coleções que não diferenciam maiúsculas de minúsculas.The CollectionsUtil class creates instances of case-insensitive collections.
Algumas coleções são transformadas.Some collections transform. Por exemplo, a HybridDictionary classe começa como ListDictionary e se torna uma Hashtable quando se torna grande.For example, the HybridDictionary class starts as a ListDictionary and becomes a Hashtable when it becomes large. O KeyedCollection<TKey,TItem> é uma lista, mas também cria um dicionário de pesquisa quando o número de elementos atinge um limite especificado.The KeyedCollection<TKey,TItem> is a list but it also creates a lookup dictionary when the number of elements reaches a specified threshold.