I’m using Visual C# 2010 Express to create a Form that has the user choose a type of car(compact, standard, luxury) and a date on the calendar for how long they are going to rent it. I can’t seem to figure out how to calculate the amount of days to find the total cost.
I tried NumberDays = (Calendar.SelectionEnd - Calendar.SelectionStart);
but I get an error “Cannot implicitly convert type ‘SystemTimeSpan’ to ‘int'”
I also tried to make today’s date being the start date and a selection on the calendar being the end date but I’m not sure how to calculate the total days for that either.
Any help would be very much appreciated.
Use