开发者

Get locale specific directory in My documents

I ha开发者_StackOverflow社区ve 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.


Use the special folders in System.Environment

var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); var subFolderPath = Path.Combine(path, "sub folder");


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜