I see that this question has been answered for Java, JavaScript, and PHP, but not C#. So, how might one calculate the number of days between two dates in C#?
Assuming StartDate and EndDate are of type DateTime:
StartDate
EndDate
DateTime
(EndDate - StartDate).TotalDays
2.1m questions
2.1m answers
60 comments
57.0k users