I'm a newbie to C#, but can't seem to find anything about this problem. Here's what I'm trying to do:
string testString = txtBox1.Text;
string testString2 = txtBox2.Text;
if ((testString == "") || (testString2 == ""))
{
MessageBox.Show("You must enter a value into both boxes");
return;
}
Basically I need to check to see if either txtBox1 or txtBox2 is blank. However I'm getting an error when running this. What's the proper way to do this (or is my approach all wrong)?