How to push an element to a stack in VB.NET

1 Answer

0 votes
Imports System
Imports System.Collections

public Class Program
	public Shared Sub Main()
        Dim st As Stack = New Stack()
		
        st.Push("vb.net")
		st.Push("c#")
        st.Push("c")
        st.Push("c++")
        st.Push("java")
        st.Push("python")
		
        Console.WriteLine(String.Join(" ", st.ToArray()))
    End Sub
End Class




' run:
'
' python java c++ c c# vb.net
'

 



answered Aug 4, 2022 by avibootz

Related questions

...