title: Passing 2D double array from C# to C++ function
body: <p>I have a function in a Managed class in c++. Let's call this function CopyDoubles. This function only receives two arrays as arguments. </p>
  
  <pre><code>double ManagedClass::CopyDoubles(double acopy[][3], double bcopy[][3]){
      //code
  }
  </code></pre>
  
  <p>From C#, I can access this function, however, I can't pass it the arguments correctly. I tried this.</p>
  
  <pre><code>double [,] a = new double[128,3];
  double [,] b = new double[128,3];
  
  double result = Managed.CopyDoubles(a,b);
  </code></pre>
  
  <p>But it does not work. What am I missing? The function will not take a and b as arguments as they are. </p>