C#如何获取系统downloads和documents路径

https://*.com/questions/7672774/how-do-i-determine-the-windows-download-folder-path

如果你通过文件夹的location属性,移动了文件夹。

比如之前在%userProfile%\downloads,被移动到了c:\workspace\clu\downloads

You can use the Windows API Code Pack for Microsoft .NET Framework.

Reference: Microsoft.WindowsAPICodePack.Shell.dll

Need the following namespace:

using Microsoft.WindowsAPICodePack.Shell;

Simple usage:

string downloadsPath = KnownFolders.Downloads.Path;
上一篇:复习HTML+CSS(3)


下一篇:基于hugo + github 建立个人博客