我正在检查文本框中的值以触发条件语句,但我收到错误消息.
if (txtAge.Text = "49") || (txtAge.Text = "59")
{
txtNote.Text = "A valid picture ID must be submitted";
}
Run Code Online (Sandbox Code Playgroud)
我得到的错误信息是无法将类型'string'隐式转换为'bool'
我该如何解决这个问题?
| 归档时间: |
|
| 查看次数: |
13848 次 |
| 最近记录: |