Hi,
I have a simple IF statement.
If a condition is true then I want to inform the user so that they can fix it and in effect break out of the statement.
I currently have this
But the code continues and doesn't break it just carrys on after OK is clicked on the Message Box.Code:if (cmbChildName.Text == "") { MessageBox.Show("Please select a childs name"); }
I want the user to be able to correct the problem..
In VB I would have used Exit Sub.
Many thanks
Mark




Reply With Quote