using System; using System.IO; class test { [STAThread] static void Main() { using (StreamWriter wr = new StreamWriter(@"c:\temp\test.txt")) { sw.WriteLine("Hello from C#"); } } }Compile with csc and try to ShellExecute from say VFP. Fails with error code 5.