The IStack interface contains properties and methods that are used to work with a stack of elements.
IStack
Principle of stack operation is First in - Last out. Elements are always added to the beginning of a stack.
Property name | Brief description | |
Count | The Count property returns the number of array elements. |
Method name | Brief description | |
Clear | The Clear method clears the stack. | |
Clone | The Clone method creates a copy of the stack. | |
Contains | The Contains method checks if an element exists in the stack. | |
Peek | The Peek method extracts value of the element placed to the stack as the last one without removing the element itself. | |
Pop | The Pop method extracts value of the element placed to the stack as the last one with removing the element itself. | |
Push | The Push method places the element into the top of the stack. | |
ToArray | The ToArray method converts a stack into a standard array. |
Method name | Brief description | |
CopyTo | The CopyTo method copies the collection into an array. |
See also: