C#获取串口列表
//using Microsoft.Win32; public void GetComList() { RegistryKey keyCom = Registry.LocalMachine.OpenSubKey("Hardware\\DeviceMap\\SerialComm"); if (keyCom != null) { string[] sSubKeys = keyCom.GetValueNames(); this.cmbComPort.Items.Clear(); foreach (string sName in sSubKeys) { string sValue = (string)keyCom.GetValue(sName); this.cmbComPort.Items.Add(sValue); } } }
转 :https://www.cnblogs.com/southhuachen/p/5117528.html
https://blog.csdn.net/BYH371256/article/details/83346490
标签:string,C#,注册表,列表,串口,keyCom From: https://www.cnblogs.com/fps2tao/p/16914053.html