Using LINQ, you can do this:
Dim listOrdered = From m In msklistclass1 Order By m.Text
Or if you cannot use LINQ or do not want to, then do this:
msklistclass1.Sort(Function(x, y) x.Name.CompareTo(y.Text))
Note: If you want to sort by a different property of the MaskedTextBox
, then just change Text
to whatever the property name is, like Name
for instance.