Dim x As Integer = dividedTwoTextBox.Text
If x%2 = 0 Then
dividedByTwoFinalLabel.Text = "Yeah, It can be divided by two!"
End If
我不知道问题出在哪里,它在“2”号的x + 2部分给了我一个意外的结束声明。它能是什么?
答案 0 :(得分:1)
您似乎想检查数字是否均匀,那么您需要这个
Dim x As Integer = CInt(dividedTwoTextBox.Text)
If x Mod 2 = 0 Then
dividedByTwoFinalLabel.Text = "Yeah, It can be divided by two!"
End If