Public Structure RingRecord
Dim recordTime As DateTime
Dim footSteps As String
Dim sportMinutes As String
Dim distance As String
Dim calorie As String
End Structure
’写比较子
Private Shared Function sortRingRecord(ByVal xRingRecord As RingRecord, ByVal yRingRecord As RingRecord) As Integer
If (xRingRecord.recordTime > yRingRecord.recordTime) Then
Return -1
ElseIf xRingRecord.recordTime = yRingRecord.recordTime Then
Return 0
Else
Return 1
End If
End Function
'排序
Dim lstRingRecord As List(Of RingRecord)
'赋值lstRingRecord
lstRingRecord.Sort(AddressOf sortRingRecord)
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |