Rendering a list of months in C# and Razor

I was curious whether or not there was an enumerator or list containing the names of the months in a year. I found the following property, and created this foreach loop to enter all of the months in a dropdown without hardcoding any values.

Not overly useful, but a nice little trick.

Leave a Reply

Your email address will not be published. Required fields are marked *