我有我的自定义应用程序在我的文档路径中生成一个目录,安装后应用程序使用该目录,但我在中文Windows操作系统中遇到问题,我的应用程序文件夹名称以中文显示,所以有什么方法我可以得到文件名在"en"或某些词汇中正确,以便我可以在运行时使用该目录名称.
Mat*_*ard 58
使用System.Environment中的特殊文件夹
String path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
小智 7
String path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
Run Code Online (Sandbox Code Playgroud)
然后您可以将文件夹名称附加为
string folder ="\\YOUR_FOLDER_NAME\\";
Run Code Online (Sandbox Code Playgroud)
然后附加到您的路径作为
String full_path=path+folder;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30068 次 |
| 最近记录: |