class OrderedDictionary

in global :: System . Collections . Specialized

Represents a collection of key/value pairs that are accessible by the key or index.


public OrderedDictionary( IEqualityComparer comparer )

Initializes a new instance of the class using the specified comparer.

  • comparer The to use to determine whether two keys are equal. -or- to use the default comparer, which is each key's implementation of .

public OrderedDictionary( int capacity )

Initializes a new instance of the class using the specified initial capacity.

  • capacity The initial number of elements that the collection can contain.

public OrderedDictionary( int capacity, IEqualityComparer comparer )

Initializes a new instance of the class using the specified initial capacity and comparer.

  • capacity The initial number of elements that the collection can contain.
  • comparer The to use to determine whether two keys are equal. -or- to use the default comparer, which is each key's implementation of .

public void Add( object key, object value )

Adds an entry with the specified key and value into the collection with the lowest available index.

  • key The key of the entry to add.
  • value The value of the entry to add. This value can be .

public bool Contains( object key )

Determines whether the collection contains a specific key.

  • key The key to locate in the collection.
  • Returns if the collection contains an element with the specified key; otherwise, .

public void CopyTo( Array array, int index )

Copies the elements to a one-dimensional object at the specified index.

  • array The one-dimensional object that is the destination of the objects copied from collection. The must have zero-based indexing.
  • index The zero-based index in at which copying begins.

public int Count { get; }

Gets the number of key/values pairs contained in the collection.

  • Returns The number of key/value pairs contained in the collection.

public void GetObjectData( SerializationInfo info, StreamingContext context )

Implements the interface and returns the data needed to serialize the collection.

  • info A object containing the information required to serialize the collection.
  • context A object containing the source and destination of the serialized stream associated with the .

public void Insert( int index, object key, object value )

Inserts a new entry into the collection with the specified key and value at the specified index.

  • index The zero-based index at which the element should be inserted.
  • key The key of the entry to add.
  • value The value of the entry to add. The value can be .

public bool IsReadOnly { get; }

Gets a value indicating whether the collection is read-only.

  • Returns if the collection is read-only; otherwise, . The default is .

public ICollection Keys { get; }

Gets an object containing the keys in the collection.

  • Returns An object containing the keys in the collection.

public void Remove( object key )

Removes the entry with the specified key from the collection.

  • key The key of the entry to remove.

public void RemoveAt( int index )

Removes the entry at the specified index from the collection.

  • index The zero-based index of the entry to remove.

public ICollection Values { get; }

Gets an object containing the values in the collection.

  • Returns An object containing the values in the collection.

public object Item { get; set; }

😔 No documentation found.

public object Item { get; set; }

😔 No documentation found.

public IDictionaryEnumerator GetEnumerator( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public OrderedDictionary( )

😔 No documentation found.

public OrderedDictionary AsReadOnly( )

😔 No documentation found.

public void Clear( )

😔 No documentation found.