codesamples:sorting_collection_delegate
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | codesamples:sorting_collection_delegate [2021/10/20 09:53] (current) – created wolfgangriedmann | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Sorting an object collection using a delegate ====== | ||
+ | < | ||
+ | constructor( cName as string ) | ||
+ | self:Name := cName | ||
+ | return | ||
+ | public property Name as string auto | ||
+ | end class</ | ||
+ | < | ||
+ | oPersons := List< | ||
+ | oPersons: | ||
+ | oPersons: | ||
+ | oPersons: | ||
+ | oPersons: | ||
+ | |||
+ | oPersons: | ||
+ | delegate( o1 a Person, o2 as Person ) { | ||
+ | local nResult as int | ||
+ | nResult := o1: | ||
+ | return nResult | ||
+ | } ; | ||
+ | )</ |
codesamples/sorting_collection_delegate.txt · Last modified: 2021/10/20 09:53 by wolfgangriedmann