title: treeview code with fixed directory
body: <p>i need help with this piece of code to get files from directory and populate them in treeview.</p>
  
  <pre><code>foreach (DirectoryInfo directory in directories)
  {
      TreeNode node = TreeView.Nodes[0].Nodes.Add(directory.Name);
      node.ImageIndex = 1;
  
  
      foreach (FileInfo file in directory.GetFiles())
      {
          if (file.Exists)
          {
              TreeNode nodes = TreeView.Nodes[0].Nodes(node.Index).Nodes.Add(file.Name);
              nodes.ImageIndex = 2;
          }
      }
  }
  </code></pre>
  
  <p>i get this error: <code>An object reference is required for the non-static field, method, or property 'System.Windows.Forms.TreeView.Nodes.get'</code></p>
  
  <p>i appreciate any kind of help thanks</p>