title: How can I pass a reference parameter (&) (not pointer) using p/invoke in C#?
body: <p>I have a C++ API prototype</p>
  
  <pre><code>void Func(int&amp; size);
  </code></pre>
  
  <p>How can I translate it to P/Invoke in C#?</p>
  
  <p>From what I know, if I use </p>
  
  <pre><code>public static extern Func(ref int size); 
  </code></pre>
  
  <p>, the function will receive a pointer to the int instead of the value.</p>