In windowsphone, especially in calender applications we may need to find difference between two dates like this
DateTime date1= DateTime.Now; DateTime date2= DateTime.Now.AddDays(-1); double diff = (date1 - date2).TotalDays;