当前位置: 动力学知识库 > 问答 > 编程问答 >

vb.net - Error: Property access must assign to the property or use its value

问题描述:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Shell("Shutdown /s /t 60 /c See_You_Again!!!")

If ComboBox1.Text = "IKWAS-JATI1" Then

Button1("See_You_Again")

End If

End Sub

网友答案:

I think you are trying to set the button Text based on ComboBox1.Text if so you have to use Button1.Text, Hence your snippet will be:

If ComboBox1.Text = "IKWAS-JATI1" Then
    Button1.Text = "See_You_Again"
End If
分享给朋友:
您可能感兴趣的文章:
随机阅读: