title: String as char[] array in C# 3.0?
body: <p>The <a href="http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx" rel="nofollow noreferrer">C# 3.0 spec</a> has the following code example in section 10.6.1.3 "Output parameters":</p>
  
  <pre><code>using System;
  class Test
  {
      static void SplitPath(string path, out string dir, out string name) {
          int i = path.Length;
          while (i &gt; 0) {
              char ch = path[i – 1];
              if (ch == '\\' || ch == '/' || ch == ':') break;
              i--;
          }
          dir = path.Substring(0, i);
          name = path.Substring(i);
      }
      static void Main() {
          string dir, name;
          SplitPath("c:\\Windows\\System\\hello.txt", out dir, out name);
          Console.WriteLine(dir);
          Console.WriteLine(name);
      }
  }
  </code></pre>
  
  <p>I cannot get this code to compile in VS2005/C#2.0. Did the behavior of strings in C# 3.0 change so that a string can be referred as a char[] array without explicitly converting it (the statement "ch = path[i - 1]")?</p>