Lecture overview -- Keyboard shortcut: 'u'  Previous page: The Interface <b><kbd>IEnumerable<T></kbd></b> -- Keyboard shortcut: 'p'  Next page: The Interface <b><kbd>IList<T></kbd></b> -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 6 : 36
Object-oriented Programming in C#
Collection Classes
The Interface ICollection<T>

ICollection<T> contributes with membership, add, and remove operations

 

  • Operations in the interface ICollection<T>:

    • The operation prescribed in the superinterface IEnumerable<T>

    • bool Contains(T element)

    • void Add(T element)

    • bool Remove(T element)

    • void Clear()

    • void CopyTo(T[] targetArray, int startIndex)

    • int Count

    • bool IsReadOnly