Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: .NET3.5
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 22: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
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 202
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785

Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
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