To Month Name - CSharp System

CSharp examples for System:DateTime Month

Description

To Month Name

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;/*from   w  w w  .j a  v a 2 s . c o  m*/

public class Main{
        public static string ToMonthName(this DateTime date)
    {
      return CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(date.Month);
    }
}

Related Tutorials