Looking for linq query to fill a list with month + year for example (January 2012)
starting form current month
var currentdate = System.DateTime.Now
If Dec 2011 is the current month
then list should be like this
December 2011
January 2012
……
November 2012
I’m editing to turn my sample code into a method that I might almost use in production because it’s more testable and culture-aware:
This outputs (on a French computer):