Home  |  Delphi .net Home  |  System.Collections NameSpace
 .NET Framework
 Namespace References

  ArrayList  Class 
  BitArray  Class 
  CaseInsensitiveComparer  Class 
  Comparer  Class 
  DictionaryEntry  Structure 
  HashTable  Class 
  ICollection  Interface 
  IComparer  Interface 
  IDictionary  Interface 
  IDictionaryEnumerator  Interface 
  IEnumerator  Interface 
  IList  Interface 
  Queue  Class 
  SortedList  Class 
  Stack  Class 

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 php Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders

  System.Collections.Stack Class
A Stack is principally used in supoort of nesting - each level of nesting adds (pushes) a return value to the stack, retrieving (popping) the value on the way out.
Data is added to the top of the stack, and taken from the top, although methods are provided, such as GetEnumerator and Peek that allow processing over and above this simple first-in, first-out way.
The Stack may be constructed from scratch or from an existing stack or list. Control is provided over the capacity.
Constructor Create ( );
Constructor Create ( Collection : ICollection ; );
Constructor Create ( InitialCapacity : Integer; );
Clear  Clear (remove) all entries from the current Stack
Clone  Make a new Stack that is a clone of the current Stack
Contains  Returns true if the current Stack contains the given Value
CopyTo  Copies elements from the Stack to a single dimension array
GetEnumerator  Gets an enumerator to allow reading the elements of the current Stack
Pop  Remove the item from the top of the current Stack
Push  Add an item to the top of the current Stack
ToArray  Copies elements from the Stack to a new single dimension array

Count  Integer  Gets the number of elements contained in the Stack.
IsSynchronized  Boolean  Gets a value indicating whether access to the Stack is synchronized (thread-safe).
SyncRoot  Object  Gets an object that can be used to synchronize access to the Stack

 Delphi Basics links

 Microsoft MSDN links
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page