DateTimeFormatInfo.CurrentInfo : DateTimeFormatInfo « System.Globalization « C# / C Sharp by API






DateTimeFormatInfo.CurrentInfo

  

using System;
using System.Globalization;

class Class1 {
  static void Main(string[] args) {
         CultureInfo MyCulture = new CultureInfo("es-ES");
         DateTimeFormatInfo Myfmt;
         DateTimeFormatInfo fmt1;

         Myfmt = MyCulture.DateTimeFormat;
         fmt1  = DateTimeFormatInfo.CurrentInfo;

         Console.WriteLine(Myfmt.GetMonthName(12));
         Console.WriteLine(fmt1.GetMonthName(12));
      }
}

   
    
  








Related examples in the same category

1.DateTimeFormatInfo.DateSeparator
2.DateTimeFormatInfo.DateTimeFormat
3.DateTimeFormatInfo.GetAllDateTimePatterns
4.DateTimeFormatInfo.LongDatePattern
5.DateTimeFormatInfo.TimeSeparator