title: Get memory usage as reported by windows 8 task manager
body: <p>How do I get the total memory used by my C# application?
  I have tried:
  GC.GetTotalMemory()
  Process.GetCurrentProcess().PrivateMemorySize, PrivateMemorySize64,
  VirtualMemorySize, VMS64, PagedMS.</p>
  
  <p>They do report various values, which is OK. But these values differ from what I see in the Task Manager.</p>
  
  <p>I am using Windows 8 and the task manager shows resources used by all apps separately on the right hand side besides the application name. 
  My Application's current memory is also displayed. Suppose it is 18.9 MB, and drops down to say ~9 MB if I force a GC.Collect().</p>
  
  <p>Now,
  before GC.Collect():
  PrivateMemorySize &amp; PMS64 both report ~42 (after converting to MB)
  and GetTotalMemory() gives ~3
  PagedMS &amp; PagedMS64 gives ~379</p>
  
  <p>and after GC.Collect():
  PrivateMemorySize &amp; PMS64 both report ~39 (after converting to MB)
  and GetTotalMemory() gives ~1
  PagedMS &amp; PagedMS64 gives ~367</p>
  
  <p>But these are different from task manager's display. What I want to get is the '18.9' and '9' ie. the memory usage of my application as reported by the windows 8 task manager.
  How do I do this through code behind?
  I use .Net 4.0, visual studio 2012</p>