I’m implementing a C# program that have some binary trees.
Is there some addin to visual studio which I can use for debugging?
I need it to draw the tree in run time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a simple binary tree with a method to convert it to a string representation. You probably have your own binary tree class, but you can use this same general algorithm with that.
Here I use a single tab to separate each node. If the
ToStringof the content of each node is larger than 8 (?) characters you may need to instead use some larger number of spaces, multiple tabs, or add some character to the start of the string of each node to help you visualize it.Then to actually use it: