I am testing and learning about System.IO in c#, in my program I ask the user for some text to write in a file, store it, and then use File.WriteAllLines() to write them in a file. This however shows a error saying :
Argument 2: cannot convert from 'string' to 'System.Collections.Generic.IEnumerable'
Here is my code:
Console.WriteLine("Write Some text");
string text = Console.ReadLine();
File.WriteAllLines("Text.txt" , text);