C Sharp

From CompdigitecWiki

Jump to: navigation, search

C# is a variant of the C programming language made by Microsoft in 2001. It is possible to create graphical applications with Gtk# and Windows Forms.

[edit] How to launch a process

System.Diagnostics.Process.Start("your command here");

[edit] Launch process with output capture

System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "YourProgramHere.exe"; try { p.Start(); } catch (Win32Exception) { MessageBox.Show("YourProgramHere.exe could not be started (is it accessible?)"); } string output = p.StandardOutput.ReadToEnd(); p.WaitForExit();

[edit] External links

This page is a stub. You can help CompdigitecWiki by editing it and expanding it.

Personal tools