Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
VB.Net: Special collections The Stack
If you find yourself doing something like this in your code.
- Module Module1
- Sub Main()
- Dim _Lines As New List(Of String)
- Dim _MaxLines As Int16 = 30
- For i = 0 To _MaxLines - 1
- For i = _Lines.Count - 1 To 0 Step -1
- End Sub
- End Module
Then you probably nee a stack. The Stack is a Last In First Out collection (LIFO).
The above then becomes.