hi guys I wanted to ask if you can find a better way of simplifying my code. I have an if condition for a registration form filled with of course many textboxes that is needed to get the details of a certain user, if a certain textbox is empty it will show a messagebox saying "Please fill up the missing details" if you leave a textbox blank.
Now my code is like this:
string x = textBox7.Text;
string y = textBox8.Text;
if ((x == "") || (y == ""))
{
MessageBox.Show("Please fill up all the required details.");
}
I can say it's quite time consuming and not very wise to put up all the textboxes in the condition and name them with a certain string variable. Can anyone suggest a simpler way of getting my code done??? Thanks in advanced for those who will help. God Bless you all!