Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to get Free Physical Memory of OS using c#?
Sumit Kumawat
Nov 20 2017 3:35 AM
147
Reply
Hi all,
I want to fetch the FreePhysicalMemory of os using c#,
for this im writing WMI qquery below is my code
ObjectQuery wql = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(wql);
ManagementObjectCollection results = searcher.Get();
foreach (var result in results)
{
//Free amount
Free = Convert.ToInt32( result["FreePhysicalMemory"]);
}
but the value i am getting is not matching with task manager's value.currenty i am using window 7 OS.
plz tell me if there is any other way to get accurate value
TIA
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Crystal Report: move next Text object upward
Can i convert Desktop application to Windows application?