TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sumit Kumawat
NA
454
414.5k
how to get Free Physical Memory of OS using c#?
Nov 20 2017 3:35 AM
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
Reply
Answers (
1
)
Crystal Report: move next Text object upward
Can i convert Desktop application to Windows application?