sort没有办法直接对复杂对象进行排序,默认情况下仅对值类型数据有效。
需要借助字典进行处理
dim lst as list(of row) = 获取的row集合
dim dict as new dictionary(of date,row)
dim lstDate as list(of date)
for each r as row in lst
dict.add(r("完成时间"),row)
lstDate.add(r("完成时间"))
next
lstDate.sort()
lst.clear
for each d as date in lstDate
lst.add(dict(d))
next