Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 10th, 2003, 08:14 AM
Registered User
 
Join Date: Jun 2003
Location: Chennai, Tamil Nadu, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default can collection object holds another arrar

hi

can a object in a collection can store a another collection object ie: arraylist, each object in collection store data of seperate array list


Dim col(5) As Collection
Dim arr as new ArrayList()

form Load event
Dim test As New ArrayList()
'adding 5 object as in "col" collection
        test.Add(100)
        Dim i As Integer
        For i = 1 To 5
            col.Add(CType(test, ArrayList), CStr(i))
        Next


ButtonClick Event
 Dim Temp As New ArrayList()
 Dim Index As Integer
 Index = Val(TextBox1.Text)

' Assigning to particular object in collection into temp arraylist to add new value

 Temp = col.Item(CStr(Index))
 Temp.Add(Val(TextBox2.Text))

'remove the particular object from col(collection) which does not contain added value

 col.Remove(CStr(Index))

adding new temp arraylist as object in "col"(collection)
 col.Add(Temp, CStr(Index))

but the added value is added in all "col" (collection) object

can collcetion object hold other collection




Luv
PurpleHaze
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DoDragDrop holds system Koeno Pro Visual Basic 2005 5 August 31st, 2008 04:33 PM
Return Collection object from a Web Method raybo .NET Web Services 2 June 17th, 2006 07:42 AM
VB Collection object Vs Disconnected Recordset Andypat Pro VB Databases 1 February 15th, 2005 06:57 PM
what data type in vb.net holds more thab 256 bits Hisham VB.NET 2002/2003 Basics 1 November 8th, 2004 05:35 AM
Object is not a collection?! Ashleek007 Classic ASP Basics 8 January 26th, 2004 08:07 PM



All times are GMT -4. The time now is 02:09 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.