我收到错误“未为类型'String'和'CheckBox'定义Visual Basic运算符'&'。”这是有问题的代码块
If cb_Surfacearea.Checked = True AndAlso cb_Volume.Checked = True Then
Me.richtxtbox.Text = "Surface area for" & variable_sphere & " = " & cb_Surfacearea & ControlChars.NewLine & "Volume For" & variable_sphere & " = " & cb_Volume
答案 0 :(得分:0)
您可以使用类似的东西
richtxtbox.Text = "Surface area for" & variable_sphere & " = " & cb_Surfacearea.Text & ControlChars.NewLine & "Volume For" & variable_sphere & " = " & cb_Volume.Text
尚不清楚您在其中使用什么上下文。
我假设cb_Volume
和cb_Surfacearea
是复选框?