C#更改系统区域设置

N M*_*ain 6 c# locale console-application

需要将系统区域设置更改为其他国家/地区,我已经尝试过SystemParametersInfo(),GetKeyboardLayout(),但没有帮助.

如何在控制台应用程序中更改C#中的系统区域设置?

bit*_*onk 2

您可以使用SetLocalInfo

[DllImport("kernel32.dll")]
static extern bool SetLocaleInfo(uint Locale, uint LCType, string lpLCData);
Run Code Online (Sandbox Code Playgroud)