【发布时间】:2017-03-28 16:17:09
【问题描述】:
我有一个具有这种结构的通用列表:
public class Emoticon
{
public int id { get; set; }
public string code { get; set; }
public string emoticon_set { get; set; }
}
public class Emoticons
{
public List<Emoticon> emoticons { get; set; }
}
列表是Emoticons twitch_emoticons。不,我想按 ID 对列表进行排序。谁能帮帮我?
【问题讨论】:
-
var sorted = twitch_emoticons.OrderBy(e => e.id);? -
编程不像 Matrix 中的弯曲勺子——你不仅应该想要,还应该尝试做一些事情