Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to implement tree structure in c# using data structures in C#?

How to implement tree structure in c# using data structures in C#?

Scheduled Pinned Locked Moved C#
csharpdata-structureshelptutorialquestion
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hasan_Abbas
    wrote on last edited by
    #1

    Hi, I want to build an application that will enable the user to create chart of accounts in nXn(n by n) tree structure. I want to use data structures to do so. The user should be able to not only add new nodes to the tree but also manipulate the data in the tree using references to parent and child nodes(Traversing). Please, help me and provide a solution ASAP. Thank You.

    HASAN ABBAS

    A C P 3 Replies Last reply
    0
    • H Hasan_Abbas

      Hi, I want to build an application that will enable the user to create chart of accounts in nXn(n by n) tree structure. I want to use data structures to do so. The user should be able to not only add new nodes to the tree but also manipulate the data in the tree using references to parent and child nodes(Traversing). Please, help me and provide a solution ASAP. Thank You.

      HASAN ABBAS

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      Basically, i would just use the treeview. But if not have a struct or class for your node, and within it, have a list of itself:

      class Node
      {
      List<node> nodeCollection;
      ...
      }

      My current favourite word is: Bauble!

      -SK Genius

      1 Reply Last reply
      0
      • H Hasan_Abbas

        Hi, I want to build an application that will enable the user to create chart of accounts in nXn(n by n) tree structure. I want to use data structures to do so. The user should be able to not only add new nodes to the tree but also manipulate the data in the tree using references to parent and child nodes(Traversing). Please, help me and provide a solution ASAP. Thank You.

        HASAN ABBAS

        C Offline
        C Offline
        CKnig
        wrote on last edited by
        #3

        I implemented a simple AVL-tree (that are balanced trees) - the code will only compile in .net 3.5 (because I use some simple LINQ to object statements and a lot of var-declerations) but you should be able to modify it to .net 2.0 without problems (.net 1.1 is not that easy because I use generics for the tree-structures) I only commented the code in german but I can send you the files if you PM me your adress.

        U H 2 Replies Last reply
        0
        • C CKnig

          I implemented a simple AVL-tree (that are balanced trees) - the code will only compile in .net 3.5 (because I use some simple LINQ to object statements and a lot of var-declerations) but you should be able to modify it to .net 2.0 without problems (.net 1.1 is not that easy because I use generics for the tree-structures) I only commented the code in german but I can send you the files if you PM me your adress.

          U Offline
          U Offline
          Ujjaval Modi
          wrote on last edited by
          #4

          Hi, Even I am working on similar tree-project. I have already performed lot of research on it but not getting some proper result. Can you please mail your code on ujjavalmodi@gmail.com It would be a great help. Thanx in advance ! :)

          Regards, Ujjaval Modi :) Manpower moves wrenches, horsepower moves cars, and the power of the mind moves the world.

          1 Reply Last reply
          0
          • H Hasan_Abbas

            Hi, I want to build an application that will enable the user to create chart of accounts in nXn(n by n) tree structure. I want to use data structures to do so. The user should be able to not only add new nodes to the tree but also manipulate the data in the tree using references to parent and child nodes(Traversing). Please, help me and provide a solution ASAP. Thank You.

            HASAN ABBAS

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            Hasan_Abbas wrote:

            provide a solution ASAP

            Nope.

            "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            1 Reply Last reply
            0
            • C CKnig

              I implemented a simple AVL-tree (that are balanced trees) - the code will only compile in .net 3.5 (because I use some simple LINQ to object statements and a lot of var-declerations) but you should be able to modify it to .net 2.0 without problems (.net 1.1 is not that easy because I use generics for the tree-structures) I only commented the code in german but I can send you the files if you PM me your adress.

              H Offline
              H Offline
              Hasan_Abbas
              wrote on last edited by
              #6

              Hey!! I'd love to have ur code. My email ID is hasanabbas19@hotmail.com. Thanks.

              HASAN ABBAS

              C 1 Reply Last reply
              0
              • H Hasan_Abbas

                Hey!! I'd love to have ur code. My email ID is hasanabbas19@hotmail.com. Thanks.

                HASAN ABBAS

                C Offline
                C Offline
                CKnig
                wrote on last edited by
                #7

                Hi, I'm not at office for till Jan. 9th but I will send you the files on first ocassion.

                H 1 Reply Last reply
                0
                • C CKnig

                  Hi, I'm not at office for till Jan. 9th but I will send you the files on first ocassion.

                  H Offline
                  H Offline
                  Hasan_Abbas
                  wrote on last edited by
                  #8

                  Ok, thx for ur cooperation buddy. I am working on it in the meantime. I think I have come up with some kinda solution. But, please do send the code anyhow. Thanks again for ur cooperation.

                  HASAN ABBAS

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups