Create Case Insensitive Sorted List
Imports System
Imports System.Collections
Imports System.Collections.Specialized
Public Class MainClass
Shared Sub Main(ByVal args As String())
Dim sorted_list As SortedList
' Use a case-insensitive SortedList.
sorted_list = CollectionsUtil.CreateCaseInsensitiveSortedList()
sorted_list.Add("S", "Volleyball")
'sorted_list.Add("s", "Golf") ' Error because Sport = sport.
For Each obj As Object In sorted_list
Console.WriteLine(obj)
Next obj
End Sub
End Class
Related examples in the same category