Try something like this, pseudocode!
private StringBuilder GetSystemInformationString()
{
StringBuilder sb = new StringBuilder();
PropertyInfo[] properties = typeof(System.Windows.Forms.SystemInformation).GetProperties();
if (properties != null && properties.Length > 0)
{
foreach (PropertyInfo pin in properties)
{
sb.Append(System.Environment.NewLine);
sb.Append(pin.Name + " : " + pin.GetValue(pin, null));
}
}
return sb;
}
for memory, you can use something like this:
(System.Diagnostics.Process.GetCurrentProcess().WorkingSet64 / 1024).ToString() + " Kb";
Sincerely.
source
share