SortType
Tipo
metodo
Descrizione
Sorts a list with items of user defined type. The list is sorted based on the specified field.
FieldName - The case-sensitive field name that will be used for sorting. Field must contain numbers or strings.
Ascending - Whether to sort ascending or descending.
Example:
Sub Process_Globals
Type Person(Name As String, Age As Int)
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim Persons As List
Persons.Initialize
For i = 1 To 50
Dim p As Person
p.Name = "Person" & i
p.Age = Rnd(0, 121)
Persons.Add(p)
Next
Persons.SortType("Age", True) 'Sort the list based on the Age field.
For i = 0 To Persons.Size - 1
Dim p As Person
p = Persons.Get(i)
Log(p)
Next
End Sub
Sintassi
SortType(FieldName As String, Ascending As boolean)
Valore restituito
void