public static void WriteToFile(string inputText, string absoluteFilePath)
{
try
{
FileStream fs = new FileStream(absoluteFilePath, FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.Write(inputText);
sw.Close();
fs.Close();
}
catch { }
}
{
try
{
FileStream fs = new FileStream(absoluteFilePath, FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.Write(inputText);
sw.Close();
fs.Close();
}
catch { }
}
No comments:
Post a Comment