System.Collections.Specialized Przestrzeń nazw
Zawiera wyspecjalizowane i silnie wpisywane Kolekcje; na przykład słownik listy połączonej, wektor bitowy i kolekcje, które zawierają tylko ciągi. Contains specialized and strongly-typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
Klasy
CollectionChangedEventManager |
Zapewnia WeakEventManager implementację, aby można było użyć wzorca "słaby detektor zdarzeń" w celu dołączenia detektorów dla CollectionChanged zdarzenia.Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the CollectionChanged event. |
CollectionsUtil |
Tworzy kolekcje, które ignorują wielkość liter w ciągach.Creates collections that ignore the case in strings. |
HybridDictionary |
Implementuje |
ListDictionary |
Implementuje |
NameObjectCollectionBase |
Dostarcza |
NameObjectCollectionBase.KeysCollection |
Reprezentuje kolekcję String kluczy kolekcji.Represents a collection of the String keys of a collection. |
NameValueCollection |
Reprezentuje kolekcję skojarzonych String kluczy i String wartości, do których można uzyskać dostęp przy użyciu klucza lub indeksu.Represents a collection of associated String keys and String values that can be accessed either with the key or with the index. |
NotifyCollectionChangedEventArgs |
Udostępnia dane dla zdarzenia CollectionChanged.Provides data for the CollectionChanged event. |
OrderedDictionary |
Reprezentuje kolekcję par klucz/wartość, które są dostępne dla klucza lub indeksu.Represents a collection of key/value pairs that are accessible by the key or index. |
StringCollection |
Reprezentuje kolekcję ciągów.Represents a collection of strings. |
StringDictionary |
Implementuje tablicę skrótów z kluczem i wartością silnie wpisaną jako String zamiast obiektów.Implements a hash table with the key and the value strongly typed to be strings rather than objects. |
StringEnumerator |
Obsługuje prostą iterację w StringCollection .Supports a simple iteration over a StringCollection. |
Struktury
BitVector32 |
Zapewnia prostą strukturę, która przechowuje wartości logiczne i małe liczby całkowite w 32 bitach pamięci.Provides a simple structure that stores Boolean values and small integers in 32 bits of memory. |
BitVector32.Section |
Reprezentuje sekcję wektora, która może zawierać liczbę całkowitą.Represents a section of the vector that can contain an integer number. |
Interfejsy
INotifyCollectionChanged |
Powiadamia odbiorniki o zmianach dynamicznych, na przykład gdy element zostanie dodany i usunięty lub cała lista zostanie wyczyszczona.Notifies listeners of dynamic changes, such as when an item is added and removed or the whole list is cleared. |
IOrderedDictionary |
Reprezentuje indeksowaną kolekcję par klucz/wartość.Represents an indexed collection of key/value pairs. |
Wyliczenia
NotifyCollectionChangedAction |
Opisuje akcję, która spowodowała CollectionChanged zdarzenie.Describes the action that caused a CollectionChanged event. |
Delegaci
NotifyCollectionChangedEventHandler |
Reprezentuje metodę, która obsługuje CollectionChanged zdarzenie.Represents the method that handles the CollectionChanged event. |
Uwagi
Wyspecjalizowane kolekcje są kolekcjami z wysoce określonymi celami.Specialized collections are collections with highly specific purposes. NameValueCollection opiera się na, NameObjectCollectionBase ale NameValueCollection akceptuje wiele wartości na klucz, a NameObjectCollectionBase akceptuje tylko jedną wartość na klucz.NameValueCollection is based on NameObjectCollectionBase; however, NameValueCollection accepts multiple values per key, whereas NameObjectCollectionBase accepts only one value per key.
Niektóre kolekcje o jednoznacznie określonym typie w System.Collections.Specialized przestrzeni nazw są StringCollection i StringDictionary , z których oba zawierają wartości, które są ciągami wyłącznie.Some strongly typed collections in the System.Collections.Specialized namespace are StringCollection and StringDictionary, both of which contain values that are exclusively strings.
CollectionsUtilKlasa tworzy wystąpienia kolekcji bez uwzględniania wielkości liter.The CollectionsUtil class creates instances of case-insensitive collections.
Przekształcenie niektórych kolekcji.Some collections transform. Na przykład Klasa jest HybridDictionary uruchamiana jako ListDictionary a i zmienia się w Hashtable miarę.For example, the HybridDictionary class starts as a ListDictionary and becomes a Hashtable when it becomes large. KeyedCollection<TKey,TItem>Jest to lista, ale tworzy również słownik wyszukiwania, gdy liczba elementów osiągnie określony próg.The KeyedCollection<TKey,TItem> is a list but it also creates a lookup dictionary when the number of elements reaches a specified threshold.