Created
September 15, 2010 02:29
-
-
Save kwokhou/580146 to your computer and use it in GitHub Desktop.
Write a string into the given flat file (file directory and file name)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//file directory (fileDir) must end with a backslash "\" | |
private static void WriteFile(string fileDir, string fileName, string fileContent) | |
{ | |
System.IO.StreamWriter sw = new System.IO.StreamWriter(fileDir + fileName); | |
sw.Write(fileContent); | |
sw.Close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Write a string into a file. This function write the string into the given flat file (file directory and file name).