By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

Best structure for a tree class's children

P: n/a
Hi all,

Just a quick one: At the moment I use an ArrayList to store 'n Tree
classes' children.

Is this the best/quickest structure to use? What do you guys use?

Best,
Andre

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Maybe I wasn't quite clear enough about the structure of the class. I'm
actually building a tree out of nodes, and at the moment a parent node
stores its direct descendents in a ArrayList.

Nov 17 '05 #2

P: n/a
It depends a lot on what you need to do with the
hierarchy. If you are just displaying it, then this
is fine. If you need to manage drag and drop
and maintaing the new relationships, then use
this type of approach may be better:

http://www.eggheadcafe.com/articles/...atabinding.asp

--
Robbe Morris - 2004/2005 Microsoft MVP C#
EggHeadCafe's RSS Search Engine
http://www.eggheadcafe.com/articles/...h/default.aspx


<ah****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi all,

Just a quick one: At the moment I use an ArrayList to store 'n Tree
classes' children.

Is this the best/quickest structure to use? What do you guys use?

Best,
Andre

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.