I am using the following class
class Country
{
string CtryID {get; set;}
List<City> city {get; set;}
}
class City
{
string county {get; set;}
int sqkm {get; set;}
}
I want to order the result like this
Here's is some sample data for Country and City
Country
US
UK
Canada
City
CityC
CityF
CityA
CityB
CityG
CityD
CityE
I want to order the records by Country and then City (assuming some cities belong to respectivce countries) and print them like this
Canada CityA CityB CityE
UK CityG CityF
US CityC CityD
and so on