posts - 124,  comments - 29,  trackbacks - 0
           String curRowText = "Hello!"
           FileStream fs = new FileStream("D:\\file.txt",FileMode.Append,FileAccess.Write);
            StreamWriter sw = new StreamWriter(fs);
            sw.Flush();
            sw.Write(curRowText);
            sw.Flush();
            sw.Close();


或者:
StreamWriter writer = null;
try
{
writer = new StreamWriter(strFileName, true);
writer.WriteLine(strCmdText);
}
catch (Exception ex)
{
//进行异常处理
}
finally
{
if (writer != null) writetofile.Close();
}
return false;
posted on 2008-09-03 18:17 天书 阅读(822) 评论(0)  编辑 收藏 引用

<2025年8月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(5)

随笔档案

文章分类

文章档案

好友的Bolg

搜索

  •  

最新评论

阅读排行榜

评论排行榜