Home » FAQ » WinForms » Strings » How to I introduce culture information into formatted strings
You use the CultureInfo class found in the System.Globalization namespace.
DateTime dt = DateTime.Now; textBox2.Text = dt.ToString('D', new CultureInfo('de-DE')); textBox3.Text = dt.ToString('D', new CultureInfo('fr-FR'));
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with