how to find memory size occupied for my application in vb,net ?

I am developing application in my application has 20 forms.  this application is now running.  while this application is running , I want to find that  how many  size has ocuupied in memory  for my application ?
how to find it ?
Who is Participating?
Miguel OzSoftware EngineerCommented:
Task manager is not reliable, it does not show the real memory usage. You are better off using Process Explorer:

If you are interested in keep track of this value in production as well, you need to log the memory usage(or show it in a label in your app updated by a timer) using:

Sample code
Dim myProcess As Process = Process.GetCurrentProcess()
Console.WriteLine("  PagedMemorySize64: {0}", myProcess.PagedMemorySize64)

Paul MacDonaldDirector, Information SystemsCommented:
If you start the Task Manager (right-click on the task bar) the processes tab will show you your .exe and it's memory usage.
Bob LearnedCommented:
I would think that Environment.WorkingSet is what you are looking for.

Environment.WorkingSet Property
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.