[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a simple last-in-first-out (LIFO) non-generic collection of objects.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|Clear||Removes all objects from the .|
|Clone||Creates a shallow copy of the .|
|Contains||Determines whether an element is in the .|
|CopyTo||Copies the to an existing one-dimensional Array, starting at the specified array index.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetEnumerator||Returns an IEnumerator for the .|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|Peek||Returns the object at the top of the without removing it.|
|Pop||Removes and returns the object at the top of the .|
|Push||Inserts an object at the top of the .|
|ToArray||Copies the to a new array.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
is implemented as a circular buffer.
The capacity of a is the number of elements the can hold. As elements are added to a , the capacity is automatically increased as required through reallocation.
If Count is less than the capacity of the stack, Push is an O(1) operation. If the capacity needs to be increased to accommodate the new element, Push becomes an O(n) operation, where n is Count. Pop is an O(1) operation.
accepts nullNothingnullptrunita null reference (Nothing in Visual Basic) as a valid value and allows duplicate elements.