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