push

Summary

Adds an element to the collection.

Usage

public void push(T element)

Parameters

element

The element to add to the collection.

Description

Adds an element to the collection.

Examples

Basic Usage
1
2
3
4
5
import System;
 
auto stack = new Stack<int>();
stack.push(1);
stack.push(2);

Share

HTML | BBCode | Direct Link