title: Are ref and out in C# the same a pointers in C++?
body: <p>I just made a Swap routine in C# like this:</p>
  
  <pre><code>static void Swap(ref int x, ref int y)
  {
      int temp = x;
      x = y;
      y = temp;
  }
  </code></pre>
  
  <p>It does the same thing that this C++ code does:</p>
  
  <pre><code>void swap(int *d1, int *d2)
  {
      int temp=*d1;
      *d1=*d2;
      *d2=temp;
  }
  </code></pre>
  
  <p>So are the <code>ref</code> and <code>out</code> keywords like pointers for C# without using <code>unsafe</code> code?</p>