G
Guest
I created a class like so in VB.NET:
Public Class Category
Public Name As String
Public SubCategory As String
End Class
Then, I created an array:
Public Categories As Category()
I created a sort method too:
Public Class CategoryMethods
Public Shared Sub Sort()
Dim catCompare As ItemComparer = New ItemComparer()
Array.Sort(Categories, catCompare)
End Sub
End Class
Now what I want to know is this: how do I make it so that instead of just
calling CategoryMethods.Sort(), how can I call Categories.Sort() and still be
using my Sort method?
Public Class Category
Public Name As String
Public SubCategory As String
End Class
Then, I created an array:
Public Categories As Category()
I created a sort method too:
Public Class CategoryMethods
Public Shared Sub Sort()
Dim catCompare As ItemComparer = New ItemComparer()
Array.Sort(Categories, catCompare)
End Sub
End Class
Now what I want to know is this: how do I make it so that instead of just
calling CategoryMethods.Sort(), how can I call Categories.Sort() and still be
using my Sort method?