public void TestAppendAllLinesEncoding() { var filename = Util.CreateNewFileUnicode(longPathDirectory); try { File.AppendAllLines(filename, new[] { "test1", "test2" }, Encoding.Unicode); Assert.AreEqual("beginning of file" + Environment.NewLine + "test1" + Environment.NewLine + "test2" + Environment.NewLine, File.ReadAllText(filename, Encoding.Unicode)); } finally { File.Delete(filename); } }
public static void AppendAllLines(string path, IEnumerable <string> contents, Encoding encoding) { File.AppendAllLines(path, contents, encoding); }
public static void AppendAllLines(string path, IEnumerable <string> contents) { File.AppendAllLines(path, contents); }