Search code examples
c#datems-access-2007alertdeadlines

C# alert when deadline date is approaching


Ok so I have an application that stores records and does various other functions, I would like to be able to implement a way of creating some sort of alert system where by when a deadline date (stored with any record) is approaching it will tell me/user. Not sure if this is possible but any advice or suggestions would be great thanks.


Solution

  • Using System.DateTime you should be able to access the current date of the machine like this

    DateTime today = DateTime.Today;
    

    You could compare this with the stored time in your records at a regular intervall (start of the application maybe?) to check if the deadline is approaching.