How to get the month name in C#?

前端 未结 6 2052
深忆病人
深忆病人 2020-12-04 18:41

How does one go about finding the month name in C#? I don\'t want to write a huge switch statement or if statement on the month int. I

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 19:27

    string CurrentMonth = String.Format("{0:MMMM}", DateTime.Now)
    

提交回复
热议问题