Reading List Items Using VB.NET
This article explains how to read list items in VB.NET.
Reading List Items
The following code snippet creates a new list and reads all of its items and displays on the console.
Imports System.Text
Imports System.IO
Imports System.Collections.Generic
Module Module1
Sub Main()
' Create a list of strings
Dim AuthorList As New List(Of String)()
AuthorList.Add("Mahesh Chand")
AuthorList.Add("Praveen Kumar")
AuthorList.Add("Raj Kumar")
AuthorList.Add("Nipun Tomar")
AuthorList.Add("Dinesh Beniwal")
' Read all data
Console.WriteLine("Authors List")
For Each author In AuthorList
Console.WriteLine(author)
Next
Console.ReadLine()
End Sub
End Module
Output: