title: C# to C++ Array?
body: <p>I have a library provided, which i know uses C++.
  I imported the DLL as such:<br>
  <code>[DllImport("pst")] private static extern int pst_get_sensor(ref PSTSensor sensor);</code>
  The PSTSensor is a struct, in a C++ example it was defined as such:</p>
  
  <pre><code>struct PSTSensor
  {
          char    name[80];       /**&lt; Device name */
          int     id;             /**&lt; Device identifier (for other tracking interfaces */
          float   pose[16];       /**&lt; Device pose estimate as row-major matrix */
          double  timestamp;      /**&lt; Time the data was recorded */
  };
  </code></pre>
  
  <p>The problem is, that besides an Int and a Double, it uses a Float, and more importantly an array. An array is something way different between C# and C++. When using this struct to call <code>pst_get_sensor(ref sensor);</code> the entire development environment crashes on me when running the code.</p>
  
  <p>I currently do my struct in C# like this:</p>
  
  <pre><code>struct PSTSensor{
          public char[] name;
          public int id;
          public float[] pose;
          public double timestamp;
      }
  </code></pre>
  
  <p>My question is, how do i create an array that C++ understands, and properly returns? Is this even possible?</p>
  
  <p>Thanks a lot in advance,
  Smiley</p>