I'm using C# and ASP.NET 3.5. Basically I'm retrieving a column of data from a dataset and putting this into a list like so:
List<String> dates = new List<String>();
foreach (DataRow rowMonth in myDS.Tables[0].Rows)
{
string ListedMonthYear = (string)rowMonth[0];
dates.Add(ListedMonthYear);
}
The returned values are:
Apr-10
Mar-10
Feb-10
Jan-10
Dec-09
Nov-09
Oct-09
I'm interested in splitting these values into two lists with the idea of performing operations on them in the future.
Apr | 2010
Mar | 2010
Feb | 2010
Jan | 2010
Dec | 2009
Nov | 2009
Oct | 2009
What is the best way to do so?
EDIT: rowMonth is just the datarow that includes all date related values - the month-year, the month beginning, month ending, month active or inactive. Basically I'm just trying to extract that first column month-year to do operations on and ignore the rest.