public static string FileName = "test.txt";
public static void Main()
var bytes = FileName.ToFileInfo().ReadAllBytes();
string newFileName = "newTest.txt";
var file = newFileName.ToFileInfo();
file.WriteAllBytes(bytes);
Console.WriteLine(file.ReadAllText());
private static void SaveFile()
<h1>This is <b>bold</b> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
<h2>This is <i>italic</i> heading</h2>