I have a situation where I need to set my process' locale to en-US.
I know how to do this for the current thread:
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
But my application uses BackgroundWorkers
to do some processing, and the locale for these worker threads seems not to be affected by the above change to their spawning main-thread.
So how can I set the locale for all the threads in my application without setting it in each one manually?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…