Pavi S

Pavi S

  • NA
  • 41
  • 73.3k

how to sort string array in c sharp

Jan 25 2012 7:57 AM
Hi Guys,

I have two string array i want to sort both arrays with corresponding value.


string[] Id = aStr.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

string

the values are

5:2000a

6:3000

1:2000b

strind Id contain value 5,6,1

string yearcount contain values 2000a,3000,2000b

i want the output like this

strind Id 5,1,6

string yearcount 2000a,2000b,3000

and imp thing is without using array.sort() function.


please any one help as soon as possible, its very urgent.


[] yearcount = year.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

Answers (5)