Property Stack Class

IsEmpty

Return True if the Stack is empty. Return False if the Stack contains one or more items.

Signature (Visual Basic / VBA)

Public Property Get IsEmpty( _
    ) As Boolean

Code Examples

    Assuming
       Dim stkTemp As New Stack
       stkTemp.Push 1
    for example
       stkTemp.IsEmpty = False
    Dim stkTemp As New Stack
    ' Fill
    Dim intCount As Integer
    For intCount = 1 To 5
       stkTemp.Push intCount
    Next intCount
    ' Remove
    Dim varValue As Variant
    Do Until stkTemp.IsEmpty
        Debug.Print stkTemp.Pop(varValue)
        Debug.Print varValue
    Loop

Return Value

Property returns True if the Stack is currently empty, and it returns False if the Stack contains one or more items.