I am in the process of making an alarm clock app in C# via Windows Forms. So far, I have this non-working section of code for my time checker.
string alarm = this.dateTimePicker1.Text;
if (DateTime.Now.ToString() == alarm)
{
MessageBox.Show("Alarm");
}
The DateTimePicker is configured for hours, minutes, and seconds. The above code is not displaying the message box at all. Where is the problem in the snippet?
Also: are there any more efficient ways of making an alarm clock