I am working on a WPF project and I have a monthly summary that should contain the months from January to December. I managed to do this by running the following snippet:
var americanCulture = new CultureInfo("en-US"); ddlMonth.Items.AddRange(americanCulture.DateTimeFormat.MonthNames);
And got a list like:
January February March ....
But I want them to be populated as:
01 - January 02 - February 03 - March .....
Any ideas how to do this for the loop? I am new to C #. Thanks
source share