Public Class FileControl Implements IComparable(Of FileControl) Public FileName As String Public PlaceHolder As String Public PlaceHolderID As Long Public SettingID As Long Protected _Pos As Long = 0 Public Property Pos() As Long Get Return _Pos End Get Set(ByVal Value As Long) If Value < 0 Then Throw New ArgumentException("Позиция не может быть меньше 0") Else _Pos = Value End If End Set End Property 'ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.ru/fxref_mscorlib/html/4c351139-e040-0ec3-cf9e-c2d57063891a.htm Public Overloads Function CompareTo(ByVal other As FileControl) As Integer _ Implements IComparable(Of FileControl).CompareTo Return _Pos.CompareTo(other._Pos) End Function Sub New(ByVal FileName As String, ByVal PlaceHolder As Object, _ ByVal PlaceHolderID As Long, ByVal pos As Long, ByVal SettingID As Long) Me.Pos = pos Me.FileName = FileName Me.PlaceHolder = PlaceHolder Me.PlaceHolderID = PlaceHolderID Me.SettingID = SettingID End Sub End Class ' Применение Dim cc As New List(Of FileControl) cc.Sort()