title: Char array to a String using .NET system?
body: <p>How can I store the contents of a char array into a text file in C# with .NET? I have tried </p>
  
  <pre><code>char[] characters = VarInput.ToCharArray();
  System.IO.File.WriteAllText(@"C:\Users\leoga\Documents\Projects_Atom\Pad_Wood\WriteText2CharacterArray.txt", characters);
  </code></pre>
  
  <p>but it comes up with an error message saying </p>
  
  <blockquote>
    <p>Argument 2: cannot convert from 'char[]' to 'string'<br/>
    [C:\Users\leoga\Documents\Projects_Atom\Pad_Wood\converter.csproj]</p>
  </blockquote>
  
  <p>I have also tried it with <code>File.WriteAllLines()</code> but it still doesn't work. I am using c# and .NET</p>