且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何查找特定文件夹中的文件夹和文件数

更新时间:2021-09-07 00:37:36

Google的文件夹和文件的数量

解决方案的谷歌在这里...

http://www.lmgtfy.com/?q=listing+所有+文件+在+一个+目录+ c%23 [
Google before you post

A google of solutions here...

http://www.lmgtfy.com/?q=listing+all+files+in+a+directory+c%23[^]


如果您考虑要做什么,就会发现您需要用Directory类做某事.也许有一种方法可以让您获取文件;天哪,它可以称为GetFiles吗?您是否还认为可能有一种方法可以让您获取目录?继续,我会让你猜那个叫什么.
If you have a think about what you are trying to do, you will see that you need to do something with the Directory class. Perhaps there''s a method that would let you get files; gosh, could it be called GetFiles? Do you also think there might be a method that would let you get directories as well? Go on, I''ll let you guess what that one is called.