I am trying to set the LongTimePattern CurrentCulture property with the following code:
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern = "HH:mm:ss";
and I get InvalidOperationException: Instance is read-only.
Any idea how I can change it? I want to make LongTimePattern show a 24-hour format for any culture.
c # datetime time format readonly
Ionica
source share