csdn .net blog 专家群
正确回答此问题说明您对Directory.GetFiles之中的searchPattern的使用有较深的认识。
假定在path之中有且仅有3个文件。其文件名分别是Blog.h, Blog.htm和Blog.html。试试看,您能不能正确得到下面3句指令的输出。
Console.WriteLine(System.IO.Directory.GetFiles(path, "Blog*.h").Length); Console.WriteLine(System.IO.Directory.GetFiles(path, "Blog*.htm").Length); Console.WriteLine(System.IO.Directory.GetFiles(path, "Blog*.html").Length);
在命令行下使用DIR命令可以得到相似的结果。
博客围绕.net展开,提及youkuaiyun.com blog专家群,重点介绍了Directory.GetFiles中searchPattern的使用,以path中有Blog.h、Blog.htm和Blog.html三个文件为例,还指出在命令行下用DIR命令可获相似结果。
1万+

被折叠的 条评论
为什么被折叠?



