1、问题描述
在学习使用C#中的Winform平台编写一个串口助手程序时,
在编写一个更新ComboBox列表是遇到了问题,出错的代码是

2、报错信息

CS1503 参数 2: 无法从"System.Windows.Forms.ComboBox"转换为"System.Windows.Forms.ComboBox"
CS1503 参数 2: 无法从"System.Windows.Forms.ComboBox"转换为"System.Windows.Forms.ComboBox"
CS0104 "ComboBox"是"System.Windows.Forms.ComboBox"和"System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox"之间的不明确的引用
3、解决方案
根据报错信息,将CS0104处报错部分的"ComboBox"修改为"System.Windows.Forms.ComboBox"。

可以看到修改后,三个错误提示------红波浪线都解决了!
参考
【单片机课/毕设利器】B站最小白的串口调试助手教程上位机C#编程_哔哩哔哩_bilibili
MessageBox是System.windows.Forms.MessageBox和System.Windws.MessageBox之间不明确引用-CSDN社区