Creates a new custom collection in VB.Net


To Create a custom Collection Class in Visual Basic .NET.


Public Class TypeCustomCollection
Inherits CollectionBase

Default Public Property Item(ByVal index As Integer) As Type
Return CType(List(index), Type)
End Get

Set(ByVal value As Type)
List(index) = value
End Set
End Property

Public Function Add(ByVal Value As Type) As Integer
Return List.Add(Value)
End Function

Public Sub Remove(ByVal Value As Type)
If (List.Contains(Value)) Then
End If
End Sub
End Class


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: