File.WriteAllLines(String, String[], Encoding) Method in C# with Examples
File.WriteAllLines(String, String[], Encoding) is an inbuilt File class method that is used to create a new file, writes the specified string array to the file by using the specified encoding, and then closes the file.Syntax:Â public static void WriteAllLines (string path, string[] contents, System.