我有 IList<customClass>
我的 CustomClass: CreatedDate(DateTime), Name(string), Number(int)
我用 OrderBy(p => p.CreatedDate)
我的问题:我如何定制或找到一种方式只订购CreatedDate日期,不包括订单时间?
鉴于这种CreatedDate类型,DateTime您可以执行以下操作.
OrderBy(p => p.CreatedDate.Date)
Run Code Online (Sandbox Code Playgroud)