I have this if
if (hours.Text.Length < 2 || minute.Text.Length < 2)
{
DialogResult dlgresult = MessageBox.Show("Insert Hour or Minute",
"First Application",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
This will insert the hours without minutes or the minutes without hours but the MessageBox appears.
How can I show this MessageBox when only the hour’s and minute’s length is 2 or longer?
use the && operator instead of ||