打开文本的代码 去看一下msdn里面的例子,有简单记事本的代码。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [DllImport("shell32.dll")]public static extern int ShellExecuteA(int hwnd,string lpOperation , string lpFile , string lpParameters, string lpDirectory , int nShowCmd ); StreamReader srd;srd=File.File.OpenText("c:\\test.txt"); using System;using System.Diagnostics;namespace ConsoleApplication1 { class Class1 { [STAThread] static void Main(string[] args) { Process myProcess = new Process(); myProcess.StartInfo.FileName = @"notepad.exe"; myProcess.StartInfo.Arguments = @"C:\1.txt"; myProcess.Start(); Console.ReadLine(); } }} System.Diagnostics.Process.Start("Notepad.exe","c:\\test.txt"); c#能干什么啊 抓取网页 如何改TEXTBOX 关于vs2005中控件区别及高级运用的问题 关于winform树控件带checkbox的问题!!急 为什么我用MERGE不好使 请高手帮帮我!! 怎么实现拖拉画圆(见图) 如何使用ole啊? 关于建模 .NET的一小问题,急!急!急! 可以返回一个ArrayList类型的值吗? 我正在用C#开发windows程序,完成后,客户说看着不舒服,不知道有没有好点的界面程序,参考一下,谢谢
public static extern int ShellExecuteA(int hwnd,string lpOperation ,
string lpFile , string lpParameters, string lpDirectory , int nShowCmd );
srd=File.File.OpenText("c:\\test.txt");
using System.Diagnostics;namespace ConsoleApplication1 {
class Class1 {
[STAThread]
static void Main(string[] args) {
Process myProcess = new Process();
myProcess.StartInfo.FileName = @"notepad.exe";
myProcess.StartInfo.Arguments = @"C:\1.txt";
myProcess.Start();
Console.ReadLine();
}
}
}