Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 28th, 2004, 06:00 PM
Registered User
 
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default linked lists vs collections

I have Visual Basic.NET 2003.

Can I use collections in the same way I could use linked lists in C++? For instance, can I change the managed pointers for the objects in a collection (re-ordering the objects) via methods that assess the objects' properties? Can I create a collection of collections?

Where can I learn more about how to do this? Books, web pages?

TIA

 
Old June 29th, 2004, 03:51 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No a collection is not the same as a linked list. In fact there is no gaurantee the ordering of items in a collection would remain the same as you add/remove items from the collection.

Yes you can have a collection of a collection.


 
Old June 29th, 2004, 10:04 PM
Registered User
 
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. I really appreciate your prompt reply. I still have some questions, though - or is it fond hopes? - as follows:

If the program is not interactive but simply makes addition/deletion decisions based on information collected in various steps, and if it adds things "before" or "after" things already put into the collection, would the order stay as intended? And if a decision required reordering things already in the collection, could I do that by deleting them one by one in the desired order and immediately adding each one to a new collection in the new order? (Or is there a method that could simply change an object from being "before" one object and make it "before" another one, instead?)

Again, can you point me to some reference - book, web site, etc?

Quote:
quote:Originally posted by tnd
 No a collection is not the same as a linked list. In fact there is no gaurantee the ordering of items in a collection would remain the same as you add/remove items from the collection.

Yes you can have a collection of a collection.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Collections in C#? shenku C# 1 August 17th, 2005 06:16 AM
Linked Dropdown Lists contagiouss_blue Beginning VB 6 1 June 8th, 2005 10:35 AM
Linked Drop Down Lists contagiouss_blue Excel VBA 6 June 8th, 2005 09:02 AM
Doubly Linked Lists gbilios C++ Programming 2 May 13th, 2004 10:49 PM





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