C# code to get generic list of dates between starting and ending date

This code snippet will return a generic list of DateTime containing the dates between a starting date and ending date:

To view this code in action, copy and paste the following code into:

And it will return: 2/25/2007 2/26/2007 2/27/2007 2/28/2007 3/1/2007 3/2/2007 3/3/2007 3/4/2007 3/5/2007 3/6/2007

This article is part of the GWB Archives. Original Author: Tim Hibbard

New on Geeks with Blogs