Dude, if you don't mind, could you help me out with another problem also?
I wish for this function to only return true or false (not anything else) but I can't seem to do that. Could you help me out?Code:public static bool SetAlarm(int hours, int minutes, int seconds) { string wav_loc = "c:\\testjazz.wav"; SoundPlayer spWave; spWave = new SoundPlayer(wav_loc); int year, month, day; year = int.Parse(DateTime.Now.Year.ToString()); month = int.Parse(DateTime.Now.Month.ToString()); day = int.Parse(DateTime.Now.Day.ToString()); DateTime dt = new DateTime(year, month, day, hours, minutes, seconds); if (DateTime.Now.Hour == dt.Hour && DateTime.Now.Minute == dt.Minute && DateTime.Now.Second == dt.Second) { spWave.Play(); return true; } }




Reply With Quote