Monir Mia

Monir Mia

  • NA
  • 63
  • 16.6k

Sort Arraylist of Arraylist in C#

Jun 13 2011 4:45 PM
I have 3(or more then that) arraylist:

arraylist1item[0]="E;BUA;A1"
arraylist1item[1]="E;BUA;B1"


arraylist2item[0]="F;CHA;B1"
arraylist2item[1]="F;CHA;A1"
arraylist2item[2]="F;CHA;F1"
arraylist2item[3]="F;CHA;D1"
arraylist2item[4]="F;CHA;G1"

arraylist3item[0]="E;BIA;A1"
arraylist3item[1]="E;BIA;A2"
arraylist3item[2]="E;BIA;A3"

I want to sort them based on size. I have put them in another arraylist which is:

AllArrayList[0]=arraylist1item
AllArrayList[1]=arraylist2item
AllArrayList[2]=arraylist3item

Then tried but could nopt do it as I dont know how to retrieve a data from Arraylist of Arraylist. output I want them is as follows:

arraylist1item[0]="E;BUA;A1"
arraylist1item[1]="E;BUA;B1"

arraylist2item[0]="E;BIA;A1"
arraylist2item[1]="E;BIA;A2"
arraylist2item[2]="E;BIA;A3"

arraylist3item[0]="F;CHA;B1"
arraylist3item[1]="F;CHA;A1"
arraylist3item[2]="F;CHA;F1"
arraylist3item[3]="F;CHA;D1"
arraylist3item[4]="F;CHA;G1"

Any help????

Answers (2)