去看一下msdn里面的例子,有简单记事本的代码。

解决方案 »

  1.   

    [DllImport("shell32.dll")]
    public static extern int ShellExecuteA(int hwnd,string lpOperation , 
                       string lpFile , string lpParameters,  string lpDirectory , int nShowCmd );
      

  2.   

    StreamReader srd;
    srd=File.File.OpenText("c:\\test.txt");
      

  3.   

    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();
    }
    }
    }
      

  4.   

    System.Diagnostics.Process.Start("Notepad.exe","c:\\test.txt");