title: C# Tree into Array (with arrays as childs)
body: <p>well, i'm almost new to c# and i couldn't figure out how multi-leveled-arrays work in c#.</p>
  
  <p>i've made a treeView with menus in it like:</p>
  
  <hr>
  
  <ul>
  <li>menu_1</li>
  <li>--child_1.1</li>
  <li>--child_1.2</li>
  <li>----child_1.2.1</li>
  <li>----child_1.2.2</li>
  <li>----child_1.2.3</li>
  <li>--child_1.3</li>
  <li>Menu_2</li>
  <li>--child_2.1</li>
  <li>--child_2.2</li>
  <li>----child_2.2.1</li>
  </ul>
  
  <hr>
  
  <p>every single MenuItem should have 6 proppertys / attributes / values like this :</p>
  
  <p><strong>Item = { ID:int , "NAME:String , POSITION:String , ACTIVE:Bool , ACTION:bool , PATH:string }</strong></p>
  
  <p>so :</p>
  
  <pre><code>Menu_1 = { 1, "File", "1", true, false, "" }
  child_1.1 = { 2, "Open", "1.1", true, true, "./open.exe" }
  </code></pre>
  
  <p>... and so on</p>
  
  <p>so far :</p>
  
  <p>i've manually set some String-Arrays ( <strong>String[]</strong> ) for eath menuItem and filled it with the informations.</p>
  
  <pre><code>String[] Item_1 = {"1", "File", "1", "1", "0", ""};
  String[] Item_2 = ...
  
  ...
  </code></pre>
  
  <p>now i want to put all those String-Array inside an <strong>ArrayList[]</strong> and <strong>Sort()</strong> them using the "POSITION" value of each Item ( <strong>Item_1[2]</strong> )</p>
  
  <p>also i want the code to dynamicly create that Array of the Item itself, reading the values from a sql table. those arrays should NOT be just String-Arrays as i did for now, cuz i want the ID to stay a int &amp; the ACTIVE and ACTION value to stay a bool.</p>
  
  <p>the final product should look like this :</p>
  
  <pre><code>MenuItems = ArrayList(
      item_1 = Array(Int, String, String, Bool, Bool, String)  // \
      item_2 = Array(Int, String, String, Bool, Bool, String)  //  \
      item_3 = Array(Int, String, String, Bool, Bool, String)  //  / all sortet by the 3rd value, the position )
      item_4 = Array(Int, String, String, Bool, Bool, String)  // /
      ...
      )
  )
  </code></pre>
  
  <p>thanx all of you who can help me out.</p>