我有這個,如果多行的聲明如果
if (hours.Text.Length < 2 || minute.Text.Length < 2)
{
DialogResult dlgresult = MessageBox.Show("Insert Hour or Minute",
"First Application",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
這將插入,而不分鐘的時間或沒有時間分鐘,但在MessageBox出現。
當只有小時和分鐘的長度是2或更長時,如何顯示此MessageBox?
你是什麼意思,「2或加號」?大於2?另外,「我已經插入了幾個小時」,這是什麼意思?你在插入什麼? –