System.Collections Classes

The System.Collections namespace includes several prebuilt classes that you can use to manage lists of various sorts. The following sections cover them.

The Stack Collection

The Stack collection stores objects according to a first-in-last-out (FILO) basis. To add objects, one pushes them onto the Stack. To remove them, one pops them from the Stack.

The Stack implements the ICollection, IEnumerable, and ICloneable interfaces.

Note

The ICloneable interface is not a member of the System.Collections namespace. It is a member of the System namespaces, and it defines the Clone() method which is used to create a new, identical object.

Stack Properties and Methods

The methods that you will primarily be using with the Stack ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.