Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I store multiple data types in arraylists? 1

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
0
0
I want to store int32s, strings, nulls, etc all in the same array. Is this possible with an arraylist?
 
yep

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Glad to see you're still putting in maximum effort for your little purpleys Chrissie? [wink]

Sweep
...if it works dont f*** with it
curse.gif
 
Chrissie1 I am trying to use a multidimentional arraylist but I don't even know how to define/declare it. even if I did know I would not know how to use it. PLEASE, HELP ME. If there is a FAQ or some sample code or something that would be helpful. I want to be like you guys and answer everyone's questions. My handle(NoviceCoder) should explain why I don't really know this stuff.

<fontsize = "24">THANX</font>​

...and I'm out. O-BOY.
 
Something like this:

Code:
dim MyArrayList(2) as arraylist

MyArrayList(0) = new arraylist
MyArrayList(0).add(MyObject1)
MyArrayList(0).add(MyObject2)

MyArrayList(1) = new arraylist
MyArrayList(1).add(MyOtherObject1)
MyArrayList(1).add(MyOtherObject2)
MyArrayList(1).add(MyOtherObject3)

MyArrayList(2) = new arraylist
MyArrayList(2).add(MyThirdObject1)
MyArrayList(2).add(MyThirdObject2)
MyArrayList(2).add(MyThirdObject3)
MyArrayList(2).add(MyThirdObject4)

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top