Search
Categories
  ASP.NET
Visual C#
Visual Basic
.NET Framework
ADO.NET
AJAX
LINQ
Java
 
How To Rating
 
0.0 out of 5


Total Votes: 0
         
1 2 3 4 5
 




How to Sort a StringCollection object

Author: Waqas Anwar - Posted Date: 08-June-2009 - Category: .NET Framework   
Bookmark and Share
If you want to sort a StringCollection object you have to use following trick as there is no built in method in StringCollection class for sorting.
StringCollection sc = new StringCollection();

sc.Add("Nokia");
sc.Add("Sony");
sc.Add("HP");
sc.Add("Dell");
sc.Add("IBM");

ArrayList.Adapter(sc).Sort();


RELATED HOW TOs

  How to Sort a simple Array using LINQ OrderBy Operator
  How to Sort Arrays in C#
  How to reverse all elements of an Array in .NET
  How to Sort ArrayList in C#
  How to Sort ArrayList in VB.NET

LEAVE YOUR COMMENTS LEAVE YOUR COMMENTS
 Name (required)  
 Email (required
 Website


 

 


 
 
 

Categories

My Portfolio

Website Links


Copyright @ 2009 EzzyLearning.com