The Labs \ Source Viewer \ SSCLI \ System.Collections.Generic \ IList

  1. // ==++==
  2. //
  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. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Interface:  IList
  18. **
  19. **
  20. ** Purpose: Base interface for all generic lists.
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Collections.Generic
  25. {
  26.    
  27.     using System;
  28.     using System.Runtime.CompilerServices;
  29.    
  30.    
  31.     [TypeDependencyAttribute("System.SZArrayHelper")]
  32.     public interface IList<T> : ICollection<T>
  33.     {
  34.         // The Item property provides methods to read and edit entries in the List.
  35.         T this[int index]
  36.         {
  37.             get;
  38.             set;
  39.         }
  40.        
  41.         // Returns the index of a particular item, if it is in the list.
  42.         // Returns -1 if the item isn't in the list.
  43.         int IndexOf(T item);
  44.        
  45.         // Inserts value into the list at position index.
  46.         // index must be non-negative and less than or equal to the
  47.         // number of elements in the list. If index equals the number
  48.         // of items in the list, then value is appended to the end.
  49.         void Insert(int index, T item);
  50.        
  51.         // Removes the item at position index.
  52.         void RemoveAt(int index);
  53.     }
  54. }

Developer Fusion