-
-
Save deostroll/7c4e4b8f6b0da5b759a016f83c38b11a to your computer and use it in GitHub Desktop.
a program to run under mono
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
namespace caProcEnumerate | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
Console.WriteLine ("Hello World!"); | |
var procs = Process.GetProcesses (); | |
foreach (var item in procs) { | |
if (item.HasExited) { | |
Console.WriteLine ("({0}) -Exited-", item.Id); | |
} else { | |
Console.WriteLine ("({0}) {1}", item.Id, item.ProcessName); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment