求教?那位大侠会往打开的notepad里显示文本流啊?
求教?那位大侠会往打开的notepad里显示文本流啊? 用什么方法?
2011-10-20 09:03
2011-10-20 10:08
2011-10-27 14:59
程序代码://首先加入using
string path=@"C:\随机写入文档.txt";
streamReader sr=new streamRead(path);
while(!sr.Endofstream)
{
Console.WriteLine(sr.ReadLine);
}
sr.Flush();
sr.Close();
2011-11-06 09:32
程序代码:using System;
using using System.Diagnostics;
namespace Test
{
class Test
{
static void Main()
{
string data = string.Format("This is{0}some arbitrary{0}data...", Environment.NewLine);
string filePath = Path.GetTempFileName();
File.WriteAllText(filePath, data);
Process.Start("notepad", filePath);
}
}
}
2011-11-07 00:08