write a program in c# that allows the user to open file Test.text located at "E:/OfficeDocuments/Test.text" the user input string which should be copied to the file
1
Expert's answer
2016-02-18T07:45:09-0500
using System; using System.IO;
namespace stringCopy { class Program { private static void CreateIfNotExist(string pathToFile) { if (File.Exists(pathToFile)) { return; }
private static void AppendToFile(string pathToFile, string content) { // End of string in the end of file File.AppendAllText(pathToFile, content + Environment.NewLine); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment