In my Windows Phone Applicarion I need to implement logic to start some Method every 20 days, how can I implement this?
public void Method()
{
//some logic
}
Update
For example I can fix the first start of some method, then every start of application I will fix the current date time and them calculate the differens, and if the difference between the last and first sstart of some method will be more than 30 days I will start Method(). So how can I calculate the difference (days)?
So you want to know if it’s 20 (or more?) days since you last performed an action in your app.
Let’s assume that you save the date to calculate from as a
DateTimecalledsavedDate. (I’m assuming you can put this in and retrieve from IsolatedStorage without issue.)Then you can just do a simple test against the current date: