Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 public static void AppendAllLines(string path, IEnumerable <string> contents, Encoding encoding)
 {
     File.AppendAllLines(path, contents, encoding);
 }
Beispiel #3
0
 public static void AppendAllLines(string path, IEnumerable <string> contents)
 {
     File.AppendAllLines(path, contents);
 }