I'm start learning C# after few years of basic programming and I don't know how I can print total physical memory into a regular string. Here's my code:
var test = new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory;
label2.Text = test;
I keep getting Error 1: Cannot implicitly convert type 'ulong' to 'string' for that code. How can I show total physical memory as a regular string for label2?
Aucun commentaire:
Enregistrer un commentaire