Skip to content

Instantly share code, notes, and snippets.

@deostroll
Created January 16, 2017 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deostroll/7c4e4b8f6b0da5b759a016f83c38b11a to your computer and use it in GitHub Desktop.
Save deostroll/7c4e4b8f6b0da5b759a016f83c38b11a to your computer and use it in GitHub Desktop.
a program to run under mono
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