<Serializable()> Public Class GroupMember
Public Name As String
Public ID As String
Public Random As Double
End Class
<Serializable()> Public Class GroupMemberCollection
Inherits System.Collections.CollectionBase
Public GroupName As String
Public GroupStatus As String
Public Sub Add(ByVal Member As GroupMember)
' Invokes Add method of the List object to add a widget.
List.Add(Member)
End Sub
Public Sub Remove(ByVal index As Integer)
' Check to see if there is a GroupMember at the supplied index.
If index > Count - 1 Or index < 0 Then
' If no GroupMember exists, a messagebox is shown and the operation is
' cancelled.
System.Windows.Forms.MessageBox.Show("Index not valid!")
Else
' Invokes the RemoveAt method of the List object.
List.RemoveAt(index)
End If
End Sub
Public ReadOnly Property Members(ByVal index As Integer) As GroupMember
Get
' The appropriate item is retrieved from the List object and
' explicitly cast to the GroupMember type, then returned to the
' caller.
Return CType(List.Item(index), GroupMember)
End Get
End Property
End Class