HI. Suppose I have:
How would I go about sorting the list by its first property, foo using library methods?Code:Public Class myClass1 Dim foo As String Dim bar As String Dim fum As Integer Public Sub New(ByVal foo As String, ByVal bar As String, ByVal fum As Integer) Me.foo = foo Me.bar = bar Me.fum = fum End Sub End Class . . . Sub main3() Dim myList As List(Of myClass1) myList.Add(New myClass1("a0", "b0", 0)) myList.Add(New myClass1("a2", "b2", 2)) myList.Add(New myClass1("a1", "b1", 1)) myList.Add(New myClass1("a3", "b3", 4)) ' Sort the list by the foo property End Sub




Reply With Quote
