Inherits CollectionBase
Public Property TotalRecords() As Integer
Get
Return _TotalRecords
End Get
Set(ByVal value As Integer)
_TotalRecords = value
End Set
End Property
Protected _TotalRecords As Integer = 0
''' <summary>
''' Adds a new Car to the collection
''' </summary>
''' <param name="theCar">The Car to add to the collection</param>
Public Function Add(ByVal theCar As Car) As Integer
Me.TotalRecords += 1
Return List.Add(theCar)
End Function
''' <summary>
''' Inserts a new Car to the collection, at the specified index
''' </summary>
''' <param name="index">The Index to insert the Car into</param>
''' <param name="theCar">The Car to insert into the collection</param>
Public Sub Insert(ByVal index As Int32, ByVal theCar As Car)
List.Insert(index, theCar)
End Sub
''' <summary>
''' Removes a Car from the collection
''' </summary>
''' <param name="theCar">The Car to remove from the collection</param>
Public Sub Remove(ByVal theCar As Car)
List.Remove(theCar)
End Sub
''' <summary>
''' Checks to see if the Car object exists in the collection
''' </summary>
''' <param name="theCar">The Car to search for in the collection</param>
''' <returns>Returns true if the Car exists in the collection</returns>
Public Function Contains(ByVal theCar As Car) As Boolean
Return List.Contains(theCar)
End Function
''' <summary>
''' Returns the index of the Car object in the collection (if it exists)
''' </summary>
''' <param name="theCar">The Car to search for in the collection</param>
''' <returns>Returns the int index of the Car object in the collection</returns>
Public Function IndexOf(ByVal theCar As Car) As Integer
Return List.IndexOf(theCar)
End Function
Public Sub CopyTo(ByVal array() As Car, ByVal index As Integer)
List.CopyTo(array, index)
End Sub
Default Public Property Item(ByVal index As Integer) As Car
Get
Return CType(List(index), Car)
End Get
Set(ByVal value As Car)
List(index) = value
End Set
End Property