Add a reference to Microsoft.VisualBasic
and a using Microsoft.VisualBasic.Devices;
.
The ComputerInfo
class has all the information that you need.
More Related Contents:
- Arrays, heap and stack and value types
- How to get object size in memory? [duplicate]
- Reducing memory usage of .NET applications?
- How much memory does a C#/.NET object use?
- OutOfMemoryException while populating MemoryStream: 256MB allocation on 16GB system
- What is the correct Performance Counter to get CPU and Memory Usage of a Process?
- How to clear MemoryCache?
- Why the cpu performance counter kept reporting 0% cpu usage?
- .Net and Bitmap not automatically disposed by GC when there is no memory left
- Does garbage collector call Dispose()? [duplicate]
- What’s the method representation in memory?
- What’s the difference between encapsulating a private member as a property and defining a property without a private member?
- Explicitly freeing memory in c#
- What are pinned objects?
- How to calculate private working set (memory)?
- Interesting OutOfMemoryException with StringBuilder
- Weak reference benefits
- HttpClientHandler / HttpClient Memory Leak
- How are String and Char types stored in memory in .NET?
- Cannot find the memory leak
- How to use StringBuilder wisely?
- What is the correct way to free memory in C#
- Where are methods stored in memory?
- Retrieve process network usage
- How to map Win32 types to C# types when using P/Invoke?
- Binding to list causes memory leak
- PerformanceCounter reporting higher CPU usage than what’s observed
- Garbage Collection not happening even when needed
- How would the memory look like for this object?
- Memory usage in C#