title: Changing reference types(strings) inside methods
body: <p>I am passing a string variable to a method. I know strings are reference types but the value that I assign inside the method is lost. </p>
  
  <pre><code>public static void TestMethod(string myString)
  {
      myString = "world";
  }
  
  static void Main(string[] args)
  {
      string s = "hello";
      Console.WriteLine(s); // output is "hello"
      TestMethod(s);
      Console.WriteLine(s); // output is also "hello" not "world" !?
  }
  </code></pre>
  
  <p>Anyway this does not happen with an array for example. Can someone explain why might be the cause? </p>