【发布时间】:2015-05-02 08:41:12
【问题描述】:
我正在使用enumerable.range() 绑定一个组合框,它工作正常。
现在我想按降序显示结果,我该怎么做?
cboYearList.ItemsSource = Enumerable.Range( DateTime.Today.Year,1950).ToList().OrderByDescending();
【问题讨论】:
-
您可以在设置组合框的 itemsSource 之前尝试对数据进行排序。
-
感谢格兰特·温尼
标签: c# wpf linq enumerable