Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Collections.​IDictionary

Assembly: System.Runtime

Represents a nongeneric collection of key/value pairs.

Properties

public bool
IsFixedSize
Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> object has a fixed size.
public bool
IsReadOnly
Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> object is read-only.
public object
Item
public ICollection
Keys
Gets an <see cref="T:System.Collections.ICollection" /> object containing the keys of the <see cref="T:System.Collections.IDictionary" /> object.
public ICollection
Values
Gets an <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.IDictionary" /> object.

Methods

public void
Add​(object key, object value)
key The <see cref="T:System.Object" /> to use as the key of the element to add.
value The <see cref="T:System.Object" /> to use as the value of the element to add.
Adds an element with the provided key and value to the <see cref="T:System.Collections.IDictionary" /> object.
public void
Clear​()
Removes all elements from the <see cref="T:System.Collections.IDictionary" /> object.
public bool
Contains​(object key)
key The key to locate in the <see cref="T:System.Collections.IDictionary" /> object.
Returns <see langword="true" /> if the <see cref="T:System.Collections.IDictionary" /> contains an element with the key; otherwise, <see langword="false" /> .
Determines whether the <see cref="T:System.Collections.IDictionary" /> object contains an element with the specified key.
GetEnumerator​()
Returns An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.IDictionary" /> object.
Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.IDictionary" /> object.
public void
Remove​(object key)
key The key of the element to remove.
Removes the element with the specified key from the <see cref="T:System.Collections.IDictionary" /> object.