日期:2014-05-18  浏览次数:20523 次

VB.NET如何输出指定字符串文本文件?
字符串A   =   123123
输出的文本就是123123
如何输出文本?

------解决方案--------------------
dim sw as StreamWriter = new StreamWriter(Server.MapPath( "newfile.txt "),false,Encoding.Default);
sw.WriteLine( "123123 ");
------解决方案--------------------
你必须引入io空间名 imports system.io
------解决方案--------------------
是这个意思吗?

Dim str As String = "123123 "
Dim sw As StreamWriter = New StreamWriter( "e:\test.txt ", True, System.Text.Encoding.Default)
sw.Write(str)
sw.Flush()
sw.Close()