How to force localization culture to en-US in C#

1 Answer

0 votes
using System;
using System.Globalization;
using System.Threading;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            Console.WriteLine(DateTime.Now.ToString("D"));
        }
    }
}


/*
run:
 
Monday, August 13, 2018

*/

 



answered Aug 13, 2018 by avibootz
...