title: Graph like implementation in C#
body: <p>So I have an object(lets call it the Head) which has a list of objects C(C1,C2,C3,...) , T(T1,T2,...) and M(M1,M2,...) and all of these are interrelated like for e.g.</p>
  
  <pre><code>Head -&gt; C1,C2,C3 , T1 , T2 , M1 , M2
  T1   -&gt; C1,C2  
  T2   -&gt; C2,C3 
  M1   -&gt; C1, C2,C3 
  M2   -&gt; C1, C2
  </code></pre>
  
  <p>where "->" implies "related to"</p>
  
  <pre><code>So Head has 7 successors and 0 predecessors
     T1 has 1 predecessor(Head ) and 2 successors(C1,C2)
     M1 has 1 predecessor(Head ) and 3 successors(C1,C2,C3)
  and so on
  </code></pre>
  
  <p>I thought of creating a class with successors and predecessors as its properties but am not sure how to build this graph like structure from the Head object?</p>