我想测试一个文本框是否为验证目的而为空,而不是使用if x =“”。相反,我想知道是否有更好的方法来做到这一点。目前,我有:如何检查文本框是否为空VB.Net
If txtDob Is Nothing Or txtFirst Is Nothing Or txtGender Is Nothing Or txtLast Is Nothing Or txtPostcode Is Nothing Or txtStreetName Is Nothing Or txtStreetNo.Text Is Nothing Then
MessageBox.Show("One or more fields have not been completed")
Return
End If
然而,这似乎没有工作,可有人告诉我正确的方法或另一种方式来做到这一点吗?
不好意思啊,我没有注意到线程。下次我会关注它。 – lrgthrill