Am I doing something very silly here, fromDate value always remains what has been passed.
public List<String> GetDates(DateTime fromDate, DateTime toDate)
{
List<String> Dates = new List<String>();
while (fromDate <= toDate)
{
Dates.Add(fromDate.ToShortDateString());
fromDate.AddDays(1);
}
return Dates;
}
I can't figure out why, Please advise.