var employee = new[]{
new{id="2", name="name3"},
new{id="1",name="name4"},
new{id="3",name="name2"},
new{id="1",name="name1"}
};
foreach (var emp in employee.OrderBy(c => c.id))
{
Console.WriteLine("id:{0} name:{1}", emp.id, emp.name);
}
请问OrderBy如何实现对id和name同时进行排序(像order by id asc,name asc一样)?
一只甜甜圈