mscorlib(4.0.0.0) API with additions
System.Collections.IDictionary Interface Reference

Represents a nongeneric collection of key/value pairs. More...

Inheritance diagram for System.Collections.IDictionary:
[legend]
Collaboration diagram for System.Collections.IDictionary:
[legend]

Public Member Functions

bool Contains (object key)
 Determines whether the T:System.Collections.IDictionary object contains an element with the specified key. More...
 
void Add (object key, object value)
 Adds an element with the provided key and value to the T:System.Collections.IDictionary object. More...
 
void Clear ()
 Removes all elements from the T:System.Collections.IDictionary object. More...
 
new IDictionaryEnumerator GetEnumerator ()
 Returns an T:System.Collections.IDictionaryEnumerator object for the T:System.Collections.IDictionary object. More...
 
void Remove (object key)
 Removes the element with the specified key from the T:System.Collections.IDictionary object. More...
 
- Public Member Functions inherited from System.Collections.ICollection
void CopyTo (Array array, int index)
 Copies the elements of the T:System.Collections.ICollection to an T:System.Array, starting at a particular T:System.Array index. More...
 

Properties

object this[object key] [get, set]
 Gets or sets the element with the specified key. More...
 
ICollection Keys [get]
 Gets an T:System.Collections.ICollection object containing the keys of the T:System.Collections.IDictionary object. More...
 
ICollection Values [get]
 Gets an T:System.Collections.ICollection object containing the values in the T:System.Collections.IDictionary object. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the T:System.Collections.IDictionary object is read-only. More...
 
bool IsFixedSize [get]
 Gets a value indicating whether the T:System.Collections.IDictionary object has a fixed size. More...
 
- Properties inherited from System.Collections.ICollection
int Count [get]
 Gets the number of elements contained in the T:System.Collections.ICollection. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the T:System.Collections.ICollection. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe). More...
 

Detailed Description

Represents a nongeneric collection of key/value pairs.

Definition at line 8 of file IDictionary.cs.

Member Function Documentation

◆ Add()

void System.Collections.IDictionary.Add ( object  key,
object  value 
)

Adds an element with the provided key and value to the T:System.Collections.IDictionary object.

Parameters
keyThe T:System.Object to use as the key of the element to add.
valueThe T:System.Object to use as the value of the element to add.
Exceptions
T:System.ArgumentNullExceptionkey is null.
T:System.ArgumentExceptionAn element with the same key already exists in the T:System.Collections.IDictionary object.
T:System.NotSupportedExceptionThe T:System.Collections.IDictionary is read-only.-or- The T:System.Collections.IDictionary has a fixed size.

Implemented in System.Collections.Hashtable, System.Collections.SortedList, System.Collections.Specialized.ListDictionary, System.Collections.Specialized.OrderedDictionary, System.Collections.Specialized.HybridDictionary, and System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties.

◆ Clear()

◆ Contains()

bool System.Collections.IDictionary.Contains ( object  key)

Determines whether the T:System.Collections.IDictionary object contains an element with the specified key.

Parameters
keyThe key to locate in the T:System.Collections.IDictionary object.
Returns
true if the T:System.Collections.IDictionary contains an element with the key; otherwise, false.
Exceptions
T:System.ArgumentNullExceptionkey is null.

Implemented in System.Collections.Hashtable, System.Collections.SortedList, System.Collections.Specialized.ListDictionary, System.Collections.Specialized.OrderedDictionary, System.Collections.Specialized.HybridDictionary, and System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties.

◆ GetEnumerator()

◆ Remove()

void System.Collections.IDictionary.Remove ( object  key)

Removes the element with the specified key from the T:System.Collections.IDictionary object.

Parameters
keyThe key of the element to remove.
Exceptions
T:System.ArgumentNullExceptionkey is null.
T:System.NotSupportedExceptionThe T:System.Collections.IDictionary object is read-only.-or- The T:System.Collections.IDictionary has a fixed size.

Implemented in System.Collections.Hashtable, System.Collections.SortedList, System.Collections.Specialized.ListDictionary, System.Collections.Specialized.OrderedDictionary, System.Collections.Specialized.HybridDictionary, and System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties.

Property Documentation

◆ IsFixedSize

bool System.Collections.IDictionary.IsFixedSize
get

Gets a value indicating whether the T:System.Collections.IDictionary object has a fixed size.

Returns
true if the T:System.Collections.IDictionary object has a fixed size; otherwise, false.

Definition at line 58 of file IDictionary.cs.

◆ IsReadOnly

bool System.Collections.IDictionary.IsReadOnly
get

Gets a value indicating whether the T:System.Collections.IDictionary object is read-only.

Returns
true if the T:System.Collections.IDictionary object is read-only; otherwise, false.

Definition at line 48 of file IDictionary.cs.

◆ Keys

ICollection System.Collections.IDictionary.Keys
get

Gets an T:System.Collections.ICollection object containing the keys of the T:System.Collections.IDictionary object.

Returns
An T:System.Collections.ICollection object containing the keys of the T:System.Collections.IDictionary object.

Definition at line 29 of file IDictionary.cs.

◆ this[object key]

object System.Collections.IDictionary.this[object key]
getset

Gets or sets the element with the specified key.

Parameters
keyThe key of the element to get or set.
Returns
The element with the specified key, or null if the key does not exist.
Exceptions
T:System.ArgumentNullExceptionkey is null.
T:System.NotSupportedExceptionThe property is set and the T:System.Collections.IDictionary object is read-only.-or- The property is set, key does not exist in the collection, and the T:System.Collections.IDictionary has a fixed size.

Definition at line 18 of file IDictionary.cs.

◆ Values

ICollection System.Collections.IDictionary.Values
get

Gets an T:System.Collections.ICollection object containing the values in the T:System.Collections.IDictionary object.

Returns
An T:System.Collections.ICollection object containing the values in the T:System.Collections.IDictionary object.

Definition at line 38 of file IDictionary.cs.


The documentation for this interface was generated from the following file: