Click here to Skip to main content
13,549,174 members
Rate this:
Please Sign up or sign in to vote.
See more:

I need to maintain the hierarchy of requirement internally and store names in array list and do some operations on it, so I’m using Composite design pattern of .Net, but still I am facing some problem on it.
So could you please suggest me how to resolve this problem?

Hierarchy should look like this..

1.  Requirement1
1.1.    Table1
1.1.1.  Column1
1.1.2.  Column2
1.1.3.  Column3
1.2.    Table2
1.2.1.  Column1
1.2.2.  Column2
1.2.3.  Column3
And so on…
2.  Reuirement2
2.1.    Table1
2.1.1.  Column1
2.1.2.  Column2
2.1.3.  Column3
2.2.    Table2
2.2.1.  Column1
2.2.2.  Column2
2.2.3.  Column3
And so on
Posted 30-Jan-13 21:39pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to store the data in hierarchical fashion so you don't need a design pattern you need a heirarichal data structure. I suggest to create and mimic a tree data structure for this job. You will find some help on how to do this here:[^][^]

Also, you can find a lot of good article on how to create a tree structure using C# on the web.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01-2016 | 2.8.180515.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100