title: Passing objects between C# and C
body: <p>My application consist of C# code with unmanaged C dll calls.
  In my C# code I have an object/class where its properties are both system types such as string and int and other objects I have defined.</p>
  
  <p>I would like to pass this complex (Graph.cs) object to my C (dll) code, what implementation would you suggest here?</p>
  
  <p>I have tried moving structs but I fail to do so with anything other then string and int.</p>
  
  <p>Thanks.</p>
  
  <p>Code:</p>
  
  <pre><code>public Class Grpah {
  
      TupleCollection m_TupleCollection;
      int m_nGeneralIndex;       
      bool m_bPrintWRF;
      string m_sLink;  
  }
  
  public Class TupleCollection {
  
      IList&lt;Tuple&gt; _collection;
  
  }     
  
  public Class Tuple {
  
      Globals.TupleType m_ToppleType;        
      ArrayList m_Parameters;
  
  }
  
  public class TupleArgs {
  
      public string Value { get; set; }       
      public Globals.PAS PAS;
      public RefCollection RefCollection { get; set; }
      public int Time{ get; set; }      
  
  }
  
  public class RefCollection {
  
      public List&lt;int&gt; SynSet{ get; set; } 
      public Globals.PAS PAS;
  
  }
  </code></pre>