DataEngine for .NET Standard | ComponentOne
C1.DataEngine.Api Assembly / C1.DataEngine Namespace / DataList Class / Sort Method
A list of items that implements the IDataList interface.
The name of the property to sort by.
A value that indicates whether the sort order is ascending.

In This Topic
    Sort Method (DataList)
    In This Topic
    Sorts a list based on a property name and sort direction.
    Syntax
    'Declaration
     
    Public Shared Sub Sort( _
       ByVal list As IDataList, _
       ByVal name As String, _
       Optional ByVal ascending As Boolean _
    ) 
    public static void Sort( 
       IDataList list,
       string name,
       bool ascending
    )

    Parameters

    list
    A list of items that implements the IDataList interface.
    name
    The name of the property to sort by.
    ascending
    A value that indicates whether the sort order is ascending.
    Remarks

    This method can be called multiple times on the same list to specify secondary sort criteria. However, the ascending parameter must be the same for each call.

    Call this method to set sort criteria before calling ClassFactory.CreateFromDataList

    See Also