查询关键字LINQ:ascending

ascending 上下文关键字用在查询表达式的 orderby 子句中,用于指定从最小到最大的排序顺序。因为 ascending 是默认排序顺序,所以您无须指定它。

示例

下面的示例演示 ascending 在 orderby 子句中的用法。

C#
IEnumerable<string> sortAscendingQuery =
    from vegetable in vegetables
    orderby vegetable ascending
    select vegetable;
本在线速查手册由www.w◑3◑x◑u◑e.com提供,请勿盗用!