<Serializable()> _
Public Class ListBoxItemCollection : Inherits CollectionBase
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal value As ListBoxItemCollection)
MyBase.New()
Me.AddRange(value)
End Sub
Public Sub New(ByVal value() As ListBoxItem)
MyBase.New()
Me.AddRange(value)
End Sub
Default Public Property Item(ByVal index As Integer) As ListBoxItem
Get
Return CType(List(index), ListBoxItem)
End Get
Set(ByVal Value As ListBoxItem)
List(index) = Value
End Set
End Property
Public Function Add(ByVal value As ListBoxItem) As Integer
Return List.Add(value)
MessageBox.Show("hey")
End Function
Public Overloads Sub AddRange(ByVal value() As ListBoxItem)
Dim i As Integer = 0
Do While (i < value.Length)
Me.Add(value(i))
i = (i + 1)
Loop
MessageBox.Show("hey")
End Sub
Public Overloads Sub AddRange(ByVal value As ListBoxItemCollection)
Dim i As Integer = 0
Do While (i < value.Count)
Me.Add(value(i))
i = (i + 1)
Loop
MessageBox.Show("hey")
End Sub
Public Function IndexOf(ByVal value As ListBoxItem) As Integer
Return List.IndexOf(value)
End Function
Public Sub CopyTo(ByVal array() As ListBoxItem, ByVal index As Integer)
List.CopyTo(array, index)
End Sub
Public Sub Insert(ByVal index As Integer, ByVal value As ListBoxItem)
List.Insert(index, value)
End Sub
Public Sub Remove(ByVal value As ListBoxItem)
List.Remove(value)
End Sub
Public Function Contains(ByVal value As ListBoxItem) As Boolean
Return List.Contains(value)
End Function
End Class