How can I get the current user directory?

前端 未结 9 1077
说谎
说谎 2020-11-27 13:33

Using this:

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

I get this output:

\"C:\\\\Documents and S         


        
9条回答
  •  渐次进展
    2020-11-27 14:17

    Messing around with environment variables or hard-coded parent folder offsets is never a good idea when there is a API to get the info you want, call SHGetSpecialFolderPath(...,CSIDL_PROFILE,...)

提交回复
热议问题