摘要: 这是别人教的最后的最好方法:roomreports.OrderBy(r => r.GetType().GetProperty("要排序的属性名").GetValue(r,null));之前用的方法,用的是反射的方法:class Pet { public string Name{get;set;} public int Age{get;set;} } void Main() { Pet[] pets = { new Pet { Name="Tim", Age=18 }, new Pet { Name="Allen",... 阅读全文
posted @ 2013-04-26 16:24 天殇月痕 阅读(2127) 评论(0) 推荐(0)