I have a data some thing similar to this. Which has section start(1) and section end(2) and
each section might have a sub-sections as well and will also start and end with (1)(2)
In trying to build dynamic Collections objects out of the data. When ever I encounter start of section(1) I have to create a new List and add the the corresponding items to the new list and if I encounter sub-section it has to create a new List and add the subItems. The data would be in seq order.
If I take the above data then the size of the list would be 4 and the list.get(2) will have another list and list(2.2) will have another list
some thing like this.
Help is greatly appreciated.
Gorge
each section might have a sub-sections as well and will also start and end with (1)(2)
Code:
Name Value Section
---------------------------------------
1 1 0
2 2 0
3 3 1 // section start
4 4 0
5 5 0
6 6 1 // sub section start
7 7 0
8 8 2 // end of sub section 6
9 9 2 // end of section start 3
10 10 0
If I take the above data then the size of the list would be 4 and the list.get(2) will have another list and list(2.2) will have another list
some thing like this.
Code:
new List[
object[0] = 1
object[1] = 2
object[2] = new List[
object[2.0] = 4
object[2.1] = 5
object[2.2] = new List[
object[2.2.0] = 7
]
]
object[3] = 10
]
Gorge