Fill the collection list as parent child relationship from an two dimentional array
<p>I have declared class as</p>

<pre><code>public class BandColumn { public int ID; public string caption; public
int ParentID; }
</code></pre>

<p>and defined List for tha class as below,</p>

<pre><code> List&lt;BandColumn&gt; bandcolumns = new List&lt;BandColumn&gt;();
</code></pre>

<p>also have an two dimentional array as ,</p>

<pre><code>[0,0] = ""
[0,1] = ""
[0,2] = ""
[0,3] = "Months"

[1,0] = "TN"
[1,1] = "Ondate"
[1,2] = "ALA"
[1,3] = "OPC"

[2,0] = "TN"
[2,1] = "Ondate"
[2,2] = "ALA"
[2,3] = "PPC"

[3,0] = "TN"
[3,1] = "Mondate"
[3,2] = "ALA"
[3,3] = "OPC"

[4,0] = "TN"
[4,1] = "Mondate"
[4,2] = "ALA"
[4,3] = "PPC"
</code></pre>

<p>Actually I have struck to derive the list from 2D array as below in c#</p>

<pre><code>ID| CAPTION |ParentID
1 | Months  |0 
2 | TN  |0 
3 | Ondate  |2 
4 | ALA |3 
5 | OPC |4 
6 | PPC |4 
7 | Mondate |2 
8 | ALA |7 
9 | OPC |8 
10| PPC |8 
</code></pre>

<p>anybody please help me.</p>
