Monday, March 3, 2008

Method File.AppendAllText

     To add any text to test file, can be used method

File.AppendAllText(String path, String contents)

   1: string fileName = Path.GetTempFileName();


   2: string fileContent = "sample of method File.WriteAllText";


   3: File.WriteAllText(fileName, fileContent);




Additional Links:



File..::.AppendAllText Method (String, String)



File..::.AppendAllText Method (String, String, Encoding)

No comments: