Doubts with returning Arraylist...



Hey there...

I'm having this problem...: When I receive an array of arraylists, how do I
split it???

In the following example, how could I retrive the PetsKind and PetsColor
into Strings variables????

Tks in advance,
Christiano


Here's an sample code....
The arraylist would be populated like this:
Dim arr As ArrayList = New ArrayList

arr.Add(New Pets("dog", "blakc"))
arr.Add(New Pets("dog", "yellow"))
arr.Add(New Pets("dog", "white"))
arr.Add(New Pets("dog", "gray"))

arr.Add(New Pets("cat", "black"))
arr.Add(New Pets("cat", "yellow"))
arr.Add(New Pets("cat", "white"))
arr.Add(New Pets("cat", "gray"))



Public Structure Pets
Private _PetKind As String
Private _PetColor As String

Public Property Animal() As String
Get
Return _PetKind
End Get
Set(ByVal value As String)
_PetKind = value
End Set
End Property

Public Property PetColor() As String
Get
Return _PetColor
End Get
Set(ByVal value As String)
_PetColor = value
End Set
End Property

Public Sub New(ByVal Pet As String, ByVal Color As String)
_PetKind = Pet
_PetColor = Color
End Sub
End Structure


.



Relevant Pages


Loading