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.
comparerThe 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.
capacityThe 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.
capacityThe initial number of elements that the collection can contain.comparerThe 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.
keyThe key of the entry to add.valueThe value of the entry to add. This value can be .
public bool Contains( object key )
Determines whether the collection contains a specific key.
keyThe 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.
arrayThe one-dimensional object that is the destination of the objects copied from collection. The must have zero-based indexing.indexThe 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.
infoA object containing the information required to serialize the collection.contextA 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.
indexThe zero-based index at which the element should be inserted.keyThe key of the entry to add.valueThe 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.
keyThe key of the entry to remove.
public void RemoveAt( int index )
Removes the entry at the specified index from the collection.
indexThe 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.