VB.net Program to Push or Insert the Item Into a Stack Using the Collection

You are currently viewing VB.net Program to Push or Insert the Item Into a Stack Using the Collection

VB.Net program to push or insert the item into a stack using the collection

'VB.Net program to push or insert an item into 
'a stack using the collection.

Imports System
Imports System.Collections

Module Module1
    Sub Main()
        Dim stk As New Stack(5)

        stk.Push(10)
        stk.Push(20)
        stk.Push(30)
        stk.Push(40)

        Console.WriteLine("Elements are inserted successfully")
    End Sub
End Module
Elements are inserted successfully
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply