المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Win32_PhysicalMedia Problem



C# Programming
03-01-2011, 05:21 PM
Hi all,

I am trying to execute this line of code but it not providing me the values

ManagementObjectSearcher pd = new ManagementObjectSearcher("SELECT Name, MediaType, MediaDescription from Win32_PhysicalMedia");
foreach (ManagementObject mp in pd.Get())
richTextBox3.Text += mp["Name"] + " " + mp["MediaType"] + " " + mp["MediaDescription"]; Can anybody please tell me what i am doing wrong or if i need to include something in this...
mainly i want to find media type...

Thanks in advance