<p>I am using an asp:Calander and I have an object that has a beginning date and an ending date. I need to get all the dates between these two dates and place them in an array so i can then render corresponding dates on the calander with different CSS</p>

```
```
DateTime startDate;
DateTime endDate;

DateTime currentDate = startDate;
List<DateTime> dates = new List<DateTime> ();

while (true)
{
    dates.Add (currentDate);
    if (currentDate.Equals (endDate)) break;
    currentDate = currentDate.AddDays (1);
}
```
```
It assumes that startDate < than endDate, you get the results on the "dates" list