To get the total ram of system in C# and VB.NET you can use the following snippet.
Sample C#
Console.WriteLine("Total RAM (bytes) in System: {0}", new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory);
Sample VB.NET
Console.WriteLine("Total RAM (bytes) in System: {0}", New Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory)
RT @CodeSnippetsNET: How to get the total ram of system in .NET http://t.co/ZOacZ6PROV #csharp #vb #dotnet #programming