title: Pass an argument by reference in C++/CLI so re-assignment affects the caller
body: <p>Probably this is not a difficult question, but I am always a little bit confused on how to treat String type as an argument in Visual C++. I have the following to functions:</p>
  
  <pre><code>void function_1(String ^str_1)
  {
    str_1 = gcnew String("Test");
  }
  
  void function_2()
  {
    String ^str_2 = nullptr;
    function_1(str_2);
  }
  </code></pre>
  
  <p>After calling <code>function_1</code>, <code>str_2</code> is still equal to <code>null</code>, but what I want to achieve is that <code>str_2</code> is equal to <code>Test</code>. So, how can I achieve that the content of <code>str_1</code> is passed to <code>function_2</code>?</p>
  
  <p>Thanks for any advice.</p>