Skip to content

Instantly share code, notes, and snippets.

@kwokhou
Created September 15, 2010 02:29
Show Gist options
  • Save kwokhou/580146 to your computer and use it in GitHub Desktop.
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)
//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();
}
@kwokhou
Copy link
Author

kwokhou commented Sep 15, 2010

Write a string into a file. This function write the string into the given flat file (file directory and file name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment