How to Sort an Arraylist?

 Posted by vishalneeraj-24503 on 12/25/2013 | Category: C# Interview questions | Views: 791 | Points: 40
Answer:

Arraylist has a Sort() method,when applied,then Arraylist Items will be Sorted in Ascending Order.

For Example:-

arr_list_names.Sort();

Where arr_list_names is our ArrayList.which contains items like Vishal,Neeraj,Pawan

After sorting,Arraylist will show item in ascending order as
Neeraj,Pawan,Vishal


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response