我正在尝试使用以下代码为排名表订购列表:
leagueTeamRow.OrderBy(c => c.points).ThenBy(c => c.goalDifference);
代码编译,但项目没有被排序,它们仍然以默认顺序显示。
这是我的课
public class LeagueRow
{
public String teamName { get; set; }
public String managerName { get; set; }
public Int32 played { get; set; }
public Int32 won { get; set; }
public Int32 draw { get; set; }
public Int32 lost { get; set; }
public Int32 goalsFor { get; set; }
public Int32 goalsAgainst { get; set; }
public Int32 goalDifference { get; set; }
public Int32 points { get; set; }
}
谁能建议我缺少什么?