List list=new List();
list.add(new Form("小明",15));
list.add(new Form("小小明",1));
list.add(new Form("大明",25));
list.sort((left,right)=>left.age.compare(right.age));
//說明:age爲年齡,按age排完序,爲小小明,小明,大明,需要降序的話,right.age.compare(left.age)。
//List.sort(),參數支持subtype(當然除bool)。