How to Sort ArrayList in VB.NET

Waqas Anwar
06 June 2009
8023 Views

You have an ArrayList collection in your program and you want to sort its elements based on their natural order.

Dim list As New ArrayList()

list.Add("Terminator 2")
list.Add("Jurassic Park")
list.Add("Die Hard 4")
list.Add("Titanic")

list.Sort()