当我输入数字时,程序运行正常,但是当我退格以输入另一个数字时,则显示错误。
public boolean equals(Object other) {
if(other instanceof Counter) {
Counter that = (Counter) other;
return (this.count == that.count);
}
else {
return false;
}
}
答案 0 :(得分:0)
计算之前,您必须检查TextBox1.Text <> ""
。
If TextBox1.Text <> "" Then
Label1.Text = "The calculation is " & (TextBox1.Text * 100)
Else
Label1.Text = "no value"
End If