How to Sort ArrayList in VB.NET


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()

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Comments