The Labs \ Source Viewer \ SSCLI \ System.Collections.Specialized \ IOrderedDictionary

  1. //------------------------------------------------------------------------------
  2. // <copyright file="IOrderedDictionary.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Collections.Specialized
  16. {
  17.    
  18.     using System;
  19.     using System.Collections;
  20.    
  21.     /// <devdoc>
  22.     /// <para>
  23.     /// This interface adds indexing on the IDictionary keyed table concept. Objects
  24.     /// added or inserted in an IOrderedDictionary must have both a key and an index, and
  25.     /// can be retrieved by either.
  26.     /// This interface is useful when preserving easy IDictionary access semantics via a key is
  27.     /// desired while ordering is necessary.
  28.     /// </para>
  29.     /// </devdoc>
  30.     public interface IOrderedDictionary : IDictionary
  31.     {
  32.        
  33.         // properties
  34.         /// <devdoc>
  35.         /// Returns the object at the given index
  36.         /// </devdoc>
  37.         object this[int index]
  38.         {
  39.             get;
  40.             set;
  41.         }
  42.        
  43.         // Returns an IDictionaryEnumerator for this dictionary.
  44.         new IDictionaryEnumerator GetEnumerator();
  45.        
  46.         // methods
  47.         /// <devdoc>
  48.         /// Inserts the given object, with the given key, at the given index
  49.         /// </devdoc>
  50.         void Insert(int index, object key, object value);
  51.        
  52.         /// <devdoc>
  53.         /// Removes the object and key at the given index
  54.         /// </devdoc>
  55.         void RemoveAt(int index);
  56.     }
  57. }

Developer Fusion