Is there any way I can sort the two lists like this sample code with arrays?
The output of this code is:Code:String[] animals = {"Zebra","Kiwi","Amazona Parrot","Tiger"}; String[] places = {"Africa","New Zealand","Jamaica","India"}; Array.Sort(animals,places); foreach(String item in animals) { Console.WriteLine(item); } Console.WriteLine(); foreach(String item in places) { Console.WriteLine(item); }
Amazona Parrot
Kiwi
Tiger
Zebra
Jamaica
New Zealand
India
Africa




Reply With Quote