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.

class System.​Collections.​Specialized.​ListDictionary

Assembly: System.Collections.Specialized

Inheritance: object → ListDictionary

Implemented Interfaces

Implements <see langword="IDictionary" /> using a singly linked list. Recommended for collections that typically include fewer than 10 items.

Properties

public int
Count
Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public bool
IsFixedSize
Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> has a fixed size.
public bool
IsReadOnly
Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is read-only.
public bool
IsSynchronized
Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is synchronized (thread safe).
public object
Item
public ICollection
Keys
Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public object
SyncRoot
Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public ICollection
Values
Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.ListDictionary" /> .

Methods

public void
Add​(object key, object value)
Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
key The key of the entry to add.
value The value of the entry to add. The value can be <see langword="null" /> .
public void
Clear​()
Removes all entries from the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public bool
Contains​(object key)
Determines whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains a specific key.
Returns <see langword="true" /> if the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains an entry with the specified key; otherwise, <see langword="false" /> .
key The key to locate in the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public void
CopyTo​(Array array, int index)
Copies the <see cref="T:System.Collections.Specialized.ListDictionary" /> entries to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.
array The one-dimensional <see cref="T:System.Array" /> that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.ListDictionary" /> . The <see cref="T:System.Array" /> must have zero-based indexing.
index The zero-based index in <paramref name="array" /> at which copying begins.
GetEnumerator​()
Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
Returns An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
public void
Remove​(object key)
Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.ListDictionary" /> .
key The key of the entry to remove.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object