To Short Month Name - CSharp System

CSharp examples for System:DateTime Month

Description

To Short Month Name

Demo Code


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

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

Related Tutorials