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

  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:  ICollection
  18. **
  19. **
  20. ** Purpose: Base interface for all generic collections.
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Collections.Generic
  25. {
  26.     using System;
  27.     using System.Runtime.CompilerServices;
  28.    
  29.    
  30.     [TypeDependencyAttribute("System.SZArrayHelper")]
  31.     public interface ICollection<T> : IEnumerable<T>
  32.     {
  33.         // Interfaces are not serialable
  34.         // Number of items in the collections.
  35.         int Count {
  36.             get;
  37.         }
  38.        
  39.         bool IsReadOnly {
  40.             get;
  41.         }
  42.        
  43.         void Add(T item);
  44.        
  45.         void Clear();
  46.        
  47.         bool Contains(T item);
  48.        
  49.         // CopyTo copies a collection into an Array, starting at a particular
  50.         // index into the array.
  51.         //
  52.         void CopyTo(T[] array, int arrayIndex);
  53.        
  54.         //void CopyTo(int sourceIndex, T[] destinationArray, int destinationIndex, int count);
  55.        
  56.         bool Remove(T item);
  57.        
  58.        
  59.     }
  60. }

Developer Fusion