How to list all month names, e.g. for a combo?

后端 未结 16 1014
栀梦
栀梦 2020-12-23 14:38

At the moment I\'m creating a DateTime for each month and formatting it to only include the month.
Is there another or any better way to do this?

16条回答
  •  臣服心动
    2020-12-23 14:50

    You can use the following to return an array of string containing the month names

    System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames
    

提交回复
热议问题