Export (0) Print
Expand All

SortDirection Enumeration

Specifies the direction in which to sort a list of items.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

public enum SortDirection

Member nameDescription
AscendingSort from smallest to largest —for example, from 1 to 10.
DescendingSort from largest to smallest — for example, from 10 to 1.

The SortDirection enumeration is used to represent the direction in which items are sorted. It is used by properties such as the SortDirection property of the WebGrid class.

The following example shows how to use the SortDirection enumeration.

© 2014 Microsoft