Get locale specific directory in My documents

2019-02-11 12:14发布

I have my custom application that generates a directory in My documents path, after installation the application uses that directory, but i got an issue in Chinese windows OS, where my application folder name appears in Chinese, so is there any way i can get the file name properly in "en" or some wordaround so that i can that directory name at runtime.

标签: c# window locale
2条回答
Rolldiameter
2楼-- · 2019-02-11 12:51
String path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

then you can append folder name as

string folder ="\\YOUR_FOLDER_NAME\\";

Then append to you path as

String full_path=path+folder;
查看更多
放荡不羁爱自由
3楼-- · 2019-02-11 12:53

Use the special folders in System.Environment

String path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

查看更多
登录 后发表回答