how can i make my node info in linked list as an object of another class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LoveLorn
    New Member
    • Dec 2009
    • 3

    how can i make my node info in linked list as an object of another class

    how can i make my node info in linked list as an object of another class
    f.e i want to make my node data as a person information like name , surname , date of birth and job . can any one help me plz
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    If you mean a TreeView node, look at it's tag property.
    A tag takes an object, so you could give it whatever you like.

    Comment

    • LoveLorn
      New Member
      • Dec 2009
      • 3

      #3
      it isn't treeview node . i'll explain my project is to make a family linked list information and each family has 3 component : husband , wife and children as the number of children varies from family to family . eah person is , in turn represented by astructure of 3 component name , surname and date of birth . and i don't know how to construct this project . can u help me ??

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        Don't use a structure. Use a class.

        I've never done a project with LinkedList
        But I've done several using TreeNodes without ever actually using a TreeView control to show them. I just wanted a node based data structure that let me keep adding node... and subnodes etc.


        Treenode is nice for that since it has a text property for its label as well as a tag property to take whatever object you want to assign it: Whether it be a leaf on a family tree or a menuitem or a modular plugin.

        Comment

        • LoveLorn
          New Member
          • Dec 2009
          • 3

          #5
          thank you very much .. i will try this :)

          Comment

          Working...