title: Useful C# class/methods for DFS and BFS program
body: <p>I have an XML file of nodes with their connections. Something like:</p>
  
  <pre><code>&lt;Graph&gt;
    &lt;Node Name = "A"&gt;
      &lt;ConnectsTo&gt;B&lt;/ConnectsTo&gt;
      &lt;ConnectsTo&gt;H&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node Name="B"&gt;&lt;/Node&gt;
    &lt;Node Name="C"&gt;
      &lt;ConnectsTo&gt;E&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node Name="D"&gt;
      &lt;ConnectsTo&gt;C&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node Name="E"&gt;&lt;/Node&gt;
    &lt;Node Name="F"&gt;
      &lt;ConnectsTo&gt;D&lt;/ConnectsTo&gt;
      &lt;ConnectsTo&gt;G&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node Name="G"&gt;
      &lt;ConnectsTo&gt;E&lt;/ConnectsTo&gt;
      &lt;ConnectsTo&gt;I&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node name="H"&gt;
      &lt;ConnectsTo&gt;C&lt;/ConnectsTo&gt;
      &lt;ConnectsTo&gt;J&lt;/ConnectsTo&gt;
      &lt;ConnectsTo&gt;G&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node name="I"&gt;
      &lt;ConnectsTo&gt;E&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
    &lt;Node name="J"&gt;
      &lt;ConnectsTo&gt;A&lt;/ConnectsTo&gt;
    &lt;/Node&gt;
  &lt;/Graph&gt;
  </code></pre>
  
  <p>Now, I will map those nodes using either BFS or DFS and print how nodes are being mapped/retrieved.</p>
  
  <p>Sample Prompt : </p>
  
  <pre><code>Choose (1)DFS (2)BFS : 1
  Choose Starting Vertex : A
  
  Result : 
  
  A B
  A H J
  A H C E
  A H G E
  A H G I E
  </code></pre>
  
  <p>Am I on the right track of re-arranging first the nodes in hierarchy? What classes will be useful for this (rearranging and future process)? Subclass of <code>Graph</code>? <code>LinkedList</code>?</p>