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

tree structure?

P: n/a
First, I'm sorry for my english.
Second, I've a little question: is some tree stucture like collections
ArrayList or Queue to hold tree of same objects in .NET? Maybe I can use
TreeView to that. I must hold tree of Halma's game (like checkers), which I
generate with minimax algorithm.
Hmm, is it good in english? :-) I hope :-)

Thanks for all answers.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Adalbert,

Very good English. :-)

There isn't a built-in framework class for a tree data structure. It might
be possible to use the TreeView if you have to, but it's designed for
displaying data in tree form. It will be very inefficient if you just use
it to store data.

Noramlly, people just build their own TreeNode class. If you're working in
C#, there's a good overview here:

http://www.brpreiss.com/books/opus6/

If you're working in VB, there a great book by Rod Stephens, "Ready-to-Run
Visual Basic Algorithms, 2nd Edition," that includes several chapters on how
to build and use tree data structures. (It includes an example of how to
use a decision tree for the game of Tic-Tac-Toe, which might be similar to
what you're trying to accomplish.) The book was written for Visual Basic 6,
but the general principles apply to any language, including VB.Net and C#.

Hope this helps.

--Robert Jacobson
"Adalbert" <wb*@o2.pl> wrote in message
news:bd**********@srv.cyf-kr.edu.pl...
First, I'm sorry for my english.
Second, I've a little question: is some tree stucture like collections
ArrayList or Queue to hold tree of same objects in .NET? Maybe I can use
TreeView to that. I must hold tree of Halma's game (like checkers), which I generate with minimax algorithm.
Hmm, is it good in english? :-) I hope :-)

Thanks for all answers.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.