IStack<TValue,TCont> 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義 STL/CLR 堆疊 物件的介面。
generic <typename TValue, typename TCont>
public interface class IStack : ICloneable
public interface IStack<TValue,TCont> : ICloneable
type IStack<'Value, 'Cont> = interface
interface ICloneable
Public Interface IStack(Of TValue, TCont)
Implements ICloneable
類型參數
- TValue
受控制序列中項目的類型。
- TCont
基礎容器的類型。
- 實作
屬性
| 名稱 | Description |
|---|---|
| top_item |
存取容器的最後一個元素。 |
方法
| 名稱 | Description |
|---|---|
| assign(IStack<TValue,TCont>) |
將容器中的所有元素替換為提供容器內的元素。 |
| Clone() |
建立一個新的物件,該物件是目前實例的複製品。 (繼承來源 ICloneable) |
| empty() |
判斷容器是否不含任何元素。 |
| get_container() |
存取基礎容器。 |
| pop() |
移除容器的最後一個元素。 |
| push(TValue) |
將元素附加到容器上。 |
| size() |
計算容器中元素的數量。 |
| top() |
存取容器的最後一個元素。 |