草庐IT

Envelops

全部标签

c# - LINQ orderby 降序排列日期字段

如何更改下面代码中的LINQ查询以按日期降序排序(最新的在前,最早的在后)?usingSystem;usingSystem.Linq;usingSystem.Collections.Generic;namespaceHelloworld{classMainClass{publicstaticvoidMain(string[]args){Listenv=newList();Envelopse=newEnvelops{ReportDate=DateTime.Now};env.Add(e);e=newEnvelops{ReportDate=DateTime.Now.AddDays(5)};e

c# - LINQ orderby 降序排列日期字段

如何更改下面代码中的LINQ查询以按日期降序排序(最新的在前,最早的在后)?usingSystem;usingSystem.Linq;usingSystem.Collections.Generic;namespaceHelloworld{classMainClass{publicstaticvoidMain(string[]args){Listenv=newList();Envelopse=newEnvelops{ReportDate=DateTime.Now};env.Add(e);e=newEnvelops{ReportDate=DateTime.Now.AddDays(5)};e