Read-only, generic collection of key/value pairs.
More...
Inherits ReadOnlyDictionaryBase< TKey, TValue >.
|
| | ReadOnlyDictionary (IDictionary< TKey, TValue > dictionary) |
| | Creates a new ReadOnlyDictionary wrapping the given dictionary .
|
| |
| virtual bool | ContainsKey (TKey key) |
| | Determines whether the key is in this collection.
|
| |
| virtual bool | TryGetValue (TKey key, out TValue value) |
| | Retrieves the value that is associated with the specific key .
|
| |
|
|
new IDictionary< TKey, TValue > | Dictionary [get] |
| | Gets the wrapped dictionary.
|
| |
|
IDictionary< TKey, TValue > | Dictionary [get] |
| | Gets the wrapped dictionary.
|
| |
| virtual TValue | this[TKey key] [get] |
| | Gets the element that has the specified key .
|
| |
|
int | Count [get] |
| | Gets the number of items in the dictionary.
|
| |
|
virtual ICollection< TKey > | Keys [get] |
| | Gets a read-only collection of all keys in this dictionary.
|
| |
|
virtual ICollection< TValue > | Values [get] |
| | Gets a read-only collection of all values in this dictionary.
|
| |
|
| | ReadOnlyDictionaryBase (IDictionary< TKey, TValue > dictionary) |
| | Creates a new ReadOnlyDictionary wrapping the given dictionary .
|
| |
| virtual bool | Contains (KeyValuePair< TKey, TValue > item) |
| | Determines whether the item is in this collection.
|
| |
| virtual void | CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex) |
| | Copies the entire collection to a compatible one-dimensional array , starting at the specified arrayIndex .
|
| |
| virtual IEnumerator< KeyValuePair< TKey, TValue > > | GetEnumerator () |
| | Returns an enumerator that iterates through this collection.
|
| |
Read-only, generic collection of key/value pairs.
This class wraps another dictionary as a read-only view on it.
- Template Parameters
-
| TKey | Type of keys in the dictionary. |
| TValue | Type of values in the dictionary. |
◆ ReadOnlyDictionary()
| ReadOnlyDictionary |
( |
IDictionary< TKey, TValue > | dictionary | ) |
|
Creates a new ReadOnlyDictionary wrapping the given dictionary .
- Parameters
-
| dictionary | Dictionary to wrap. |
- Exceptions
-
| ArgumentNullException | dictionary is null. |