Class NamedValues<T>
Class that provides a dictionary of values with type T
, that are keyed by
names (strings).
public class NamedValues<T> : Dictionary<string, T>, IDictionary<string, T>, ICollection<KeyValuePair<string, T>>, IDictionary, ICollection, IReadOnlyDictionary<string, T>, IReadOnlyCollection<KeyValuePair<string, T>>, IEnumerable<KeyValuePair<string, T>>, IEnumerable, ISerializable, IDeserializationCallback
Type Parameters
T
Type parameter for the contained named values
- Inheritance
-
Dictionary<string, T>NamedValues<T>
- Implements
-
IDictionary<string, T>
- Inherited Members
- Extension Methods
Remarks
The keys (names) of this dictionary are compared case insensitive. i.e. the two keys 'name' and 'nAMe' will return the same value...
Constructors
NamedValues()
Default ctor.
public NamedValues()
NamedValues(IEnumerable<KeyValuePair<string, T>>)
Create a new dictionary with the contents of optional other
.
public NamedValues(IEnumerable<KeyValuePair<string, T>> other)
Parameters
other
IEnumerable<KeyValuePair<string, T>>
NamedValues(int)
Create a new dictionary with the initial capacity
.
public NamedValues(int capacity)
Parameters
capacity
int
Fields
DEFAULT_CAPACITY
Default capacity if not specified per ctor.
public const int DEFAULT_CAPACITY = 16
Field Value
Methods
AsReadonly()
Retuns a read-only version of this dctionary.
public IReadOnlyDictionary<string, T> AsReadonly()