Re: Doubts with returning Arraylist...
- From: "Christiano Donke" <cdonke@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Oct 2008 10:08:45 -0300
Figured out... tks..
For i As Integer = 0 To arr.Count - 1
TextBox1.Text &= DirectCast(arr(i), Pets).Animal & " - " &
DirectCast(arr(i), Pets).PetColor & vbCrLf
Next
"Christiano Donke" <cdonke@xxxxxxxxxxxxxxxxxx> escreveu na mensagem
news:eDvQwFoOJHA.4372@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- Doubts with returning Arraylist...
- From: Christiano Donke
- Doubts with returning Arraylist...
- Prev by Date: Re: Doubts with returning Arraylist...
- Next by Date: error when calling remote component in Web Service
- Previous by thread: Re: Doubts with returning Arraylist...
- Next by thread: error when calling remote component in Web Service
- Index(es):
Relevant Pages
|
Loading