1
Answer

com port

shovon habib

shovon habib

10y
634
1
why this code doesn't show any result??
 
ManagementObjectCollection mReturn;
ManagementObjectSearcher mSearch;
mSearch = new ManagementObjectSearcher("Select * from Win32_SerialPort");
mReturn = mSearch.Get();

foreach (ManagementObject mObj in mReturn)
{
Console.WriteLine(mObj["Name"].ToString());
}
 
please help.
Answers (1)