title: pass by reference without the ref keyword
body: <p>I'm not a veteran in socket programming, so while analyzing code I found in a database API I came across this code </p>
  
  <pre><code>    public static void WriteInt(int i, NetworkStream bufOutputStream) 
      {
          byte[] buffer = new byte[IntSize];
          WriteInt(i, buffer, 0);
          bufOutputStream.Write(buffer, 0, buffer.Length);
      }
  
      public static void WriteInt(int i, byte[] byte_array, int pos)
      {
  
          byte_array[pos] =(byte)( 0xff &amp; (i &gt;&gt; 24)); byte_array[pos+1] = (byte)(0xff &amp; (i &gt;&gt; 16)); byte_array[pos+2] = (byte)(0xff &amp; (i &gt;&gt; 8)); byte_array[pos+3] = (byte)(0xff &amp; i);
      }
  </code></pre>
  
  <p>I understand the bit-shifts what I don't understand is how the 'buffer' var keeps getting a value when no <em>ref</em> is in the args or no return is made. the bitshifts are somehow editing the actual value of buffer?</p>