title: Managed array in VC++
body: <p>I want to pass a managed array from VB.NET to a function in a VC++ project. How would I declare my C++ function and how would I use the array when I'm inside it? Specifically, I want to make VB compatible functions like the one below, which is written in plain old C.</p>
  
  <pre><code>void Vcopy(double *A, double *B)
  {
      int n;
      for(n=0;n&lt;3;n++)
      {
          B[n]=A[n];
      }
  }
  </code></pre>
  
  <p>Maybe some kind soul could convert this to something that would play nicer with VB. Thanks!</p>