Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 获取.NET中的“最近使用的文档”文件夹_C#_.net - Fatal编程技术网

C# 获取.NET中的“最近使用的文档”文件夹

C# 获取.NET中的“最近使用的文档”文件夹,c#,.net,C#,.net,如何使用C#?获取“最近使用的文档”文件夹的路径,请参见: System.Environment.SpecialFolder.Recent 因此: +1,但如果他只需要路径,则DirectoryInfo可能是不必要的:) DirectoryInfo d = new DirectoryInfo( System.Environment.GetFolderPath(Environment.SpecialFolder.Recent) );

如何使用C#?

获取“最近使用的文档”文件夹的路径,请参见:

System.Environment.SpecialFolder.Recent
因此:


+1,但如果他只需要路径,则DirectoryInfo可能是不必要的:)
DirectoryInfo d = new DirectoryInfo(
    System.Environment.GetFolderPath(Environment.SpecialFolder.Recent)
);