title: Pass reference by reference vs pass reference by value - C#
body: <p>Greetings,</p>
  
  <p>I get the difference between pass by value and pass by reference. But pass reference (such as array) by ref and pass array by value is something i can't seem to comprehend. How can you pass a reference by reference?</p>
  
  <pre><code>     int[] myArray = {1,2,3};
       PassByVal(myArray);
       PassByRef(ref myArray);
  
       PassByVal(int[] array)
       {    array = new int[] {7,8,9};   // will not work }
  
       PassByRef(ref int[] array)
       {    array = new int[] {10,11,12}; }  // will work
  </code></pre>