小编use*_*968的帖子

如何在c#中按日期时间对集合进行排序

我有一个List,我需要按DateTime排序,类MyStuff看起来像:

public class MyStuff
{
   public int Type {get;set;}
   public int Key {get;set;}
   public DateTime Created {get;set;}
}
Run Code Online (Sandbox Code Playgroud)

我需要能够通过Created(DateTime)字段对集合List进行排序.

c# sorting

43
推荐指数
2
解决办法
7万
查看次数

标签 统计

c# ×1

sorting ×1