Loading

摘要: 发现网上到处都是com操作获取的代码,下面是4.0中引入新类DriverInfo的代码,希望能有帮助。privatelongGetFreeDiskSpaceInBytes(DirectoryInfodir){//dir.RootDriveInfo[]allDrives=DriveInfo.GetDrives();vardirver=allDrives.SingleOrDefault(di=>di.Name==dir.Root.Name);if(dirver!=null){returndirver.TotalFreeSpace;}return0;} 阅读全文
posted @ 2012-03-26 16:01 today4king 阅读(356) 评论(0) 推荐(0) 编辑