如果想继续编辑之前中手庆的文档,在TXT文件尾部继续添卖握加文本薯裂,那么还需要在函数后边加个参数。
VB 代码
方法1:
Dim sw As StreamWriter = New StreamWriter("C:\temp\test.txt")
sw.Write("abc" &vbCrLf)
sw.Close()
Dim sw2 As StreamWriter = New StreamWriter("C:\temp\test.txt", True)
sw2.Write("456" &vbCrLf)
sw2.Close()
方法2:
My.Computer.FileSystem.WriteAllText("test.txt", "This is test Text", True)
方法3:
System.IO.File.AppendAllText("c:\temp\test.txt", "this is extra test file")
详见:“网页链接”
FileStream fs=new FileStream("目茄姿衫录颤腔册迟",FileMode.Read)while(fs.ReadLine())
{
....
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)