无法将类型“string”隐式转换为“bool”

2025-05-18 07:54:10
推荐回答(1个)
回答(1):

if (this.button2.Text = "断开") 把“=”号,改成“==”这样才正确!
if (this.button2.Text == "断开")