I have been having some trouble figuring out how exactly I get a process\'s ram usage. (How much ram it is currently consuming, not how much is reserved, or its max or min)<
I found this on msdn and it is working
System.Diagnostics.Process proc = ...; // assign your process here :-)
int memsize = 0; // memsize in KB
PerformanceCounter PC = new PerformanceCounter();
PC.CategoryName = "Process";
PC.CounterName = "Working Set - Private";
PC.InstanceName = proc.ProcessName;
memsize = Convert.ToInt32(PC.NextValue()) / (int)(1024);
PC.Close();
PC.Dispose();