【简答题】
阅读程序,将返回结果按姓名降序排列,请根据题目要求完成程序。 using MVCMusicStore2019.Models; namespace MVCMusicStore2019.Controllers.ExampleControllers { public class ExampleController : Controller { public GetResult() { List list = StuList(). ( x=>x. ) ; return list; } public List StuList() { List stuList = new List (); Student stu1 = new Student { Id = 1, Name = "姚明"}; Student stu2 = new Student{ Id = 2, Name = "易建联" }; Student stu3 = new Student{ Id = 3, Name = "Stephen Curry" }; Student stu4 = new Student{ Id = 4, Name = "James Harden" }; Student stu5 = new Student{ Id = 5, Name = "Splash Brothers" }; Student stu6 = new Student{ Id = 6, Name = "Klay Thompson" }; stuList.Add(stu1); stuList.Add(stu2); stuList.Add(stu3); stuList.Add(stu4); stuList.Add(stu5); stuList.Add(stu6); return stuList; } } }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
收藏
举报
参考答案:
参考解析: