O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Collection Interfaces

Like Java, the .NET Framework declares interfaces that define the core collection functionality; these interfaces provide common functionality that can be extended to achieve specialized behavior.

A class that implements one of the collection interfaces is known as a collection class. Note that a collection class is not required to implement every interface member and may throw a NotSupportedException when unimplemented members are invoked.

All of the interfaces covered in this section are found in the System.Collections namespace.

ICollection

This is the foundation of the collections namespace and is implemented by all the collection classes. It defines only the most basic collection functionality, as shown in Table 9-1.

Table 9-1. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required