Interface IDictionary
- Namespace
- System.Collections
- Assembly
- nanoFramework.System.Collections.dll
Represents a nongeneric collection of key/value pairs.
public interface IDictionary : ICollection, IEnumerable
- Inherited Members
- Extension Methods
Properties
IsFixedSize
Gets a value indicating whether the IDictionary object has a fixed size.
bool IsFixedSize { get; }
Property Value
- bool
true if the IDictionary object has a fixed size; otherwise, false.
IsReadOnly
Gets a value indicating whether the IDictionary object is read-only.
bool IsReadOnly { get; }
Property Value
- bool
true if the IDictionary object is read-only; otherwise, false.
this[object]
Gets or sets the element with the specified key.
object this[object key] { get; set; }
Parameters
key
objectThe key of the element to get or set.
Property Value
Keys
Gets an ICollection object containing the keys of the IDictionary object.
ICollection Keys { get; }
Property Value
- ICollection
An ICollection object containing the keys of the IDictionary object.
Values
Gets an ICollection object containing the values in the IDictionary object.
ICollection Values { get; }
Property Value
- ICollection
An ICollection object containing the values in the IDictionary object.
Methods
Add(object, object)
Adds an element with the provided key and value to the IDictionary object.
void Add(object key, object value)
Parameters
key
objectThe Object to use as the key of the element to add.
value
objectThe Object to use as the value of the element to add.
Clear()
Removes all elements from the IDictionary object.
void Clear()
Contains(object)
Determines whether the IDictionary object contains an element with the specified key.
bool Contains(object key)
Parameters
key
objectThe key to locate in the IDictionary object.
Returns
- bool
true if the IDictionary contains an element with the key; otherwise, false.
Remove(object)
Removes the element with the specified key from the IDictionary object.
void Remove(object key)
Parameters
key
objectThe key of the element to remove.