DataRow [] drTest包含System.Data.DataRow
,例如,包含10个DataRow
's。在每个DataRow内部,我有一个ItemArray,其中包含Name
和Count
。 现在我想根据ItemArray的第二个记录计数以降序对DataRow [] drTest进行排序。使用LINQ排序DataRow []使用LINQ
实施例:
DataRow[] drTest contains
At [0] Index - ItemArray[0] - "A"
- ItemArray[1] - 5
At [1] Index - ItemArray[0] - "B"
- ItemArray[1] - 7
我想订购drTest降序排列,以便drTest [1]应该拿出。