请教,C#有没直接得到目录大小的方法

不用遍历整个目录?
---------------------------------------------------------------

项目->引用 浏览 COM组件 Microsoft Scripting Runtime

添加引用:

下代码:
Scripting.FileSystemObject fso=new Scripting.FileSystemObjectClass();
MessageBox.Show (fso.GetFolder("D:\\ReadPix" ).Size.ToString() ) ;

Published At
Categories with Web编程
Tagged with
comments powered by Disqus