Get locale specific directory in My documents

前端 未结 2 1383
执念已碎
执念已碎 2020-12-10 10:54

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 O

相关标签:
2条回答
  • 2020-12-10 11:05

    Use the special folders in System.Environment

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

    0 讨论(0)
  • 2020-12-10 11:21
    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 讨论(0)
提交回复
热议问题