title: C# assign by reference
body: <p>Is it possible to assign by reference? I know that ref has to be used in methods. </p>
  
  <pre><code>string A = "abc";
  string B = A;
  B = "abcd";
  Console.WriteLine(A); // abc
  Console.WriteLine(B); // abcd
  </code></pre>
  
  <p>Can I have some sort of </p>
  
  <pre><code>string A = "abc";
  string B = (ref)A;
  B = "abcd"; // A was assigned to B as reference, so changing B is the same as changing A
  Console.WriteLine(A); // abcd
  Console.WriteLine(B); // abcd
  </code></pre>