JumpyNET
Centurion
- Joined
- Apr 4, 2005
- Messages
- 196
I have a class with a list of string and integer pairs. How could I make two methods for sorting the ShortFuncs list - one by the string and one by the integer?
Code:
Public Class ShortCutFuncListClass
Private Class ShortFuncClass
Public Name As String
Public ActionNumb As Integer
Public Sub New(ByVal par_Name As String, ByVal par_ActionNumb As Integer)
Name = par_Name
ActionNumb = par_ActionNumb
End Sub
End Class
Private ShortFuncs As List(Of ShortFuncClass)
Public Sub New()
ShortFuncs = New List(Of ShortFuncClass)
ShortFuncs.Add(New ShortFuncClass("Playback: Play/Pause", 0))
ShortFuncs.Add(New ShortFuncClass("Playback: Next", 1))
ShortFuncs.Add(New ShortFuncClass("Playback: Previous", 2))
ShortFuncs.Add(New ShortFuncClass("Playback: Exit", 3))
End Sub
Public Sub SortByName()
'?????????????????
End Sub
Public Sub SortByActionNumb()
'?????????????????
End Sub
End Class