如何用c#搜索硬盘 [英] how to search hard disk with c#
本文介绍了如何用c#搜索硬盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
i希望使用C#进行搜索,我给它命名,它给了我路径,所以我可以打开它或删除它... ETC
i想要一个方法来制作这不直接通过open filedialog
i有一个文本框让用户输入文件夹/文件的名称和按钮来搜索
是算法还是算法C#中的任何库都可以给我任何提示
hi
i want to search using C# like i give it the name and it give me the path so i can open it or delete it ...ETC
i want a method to make this directly not through open filedialog
i have a text box to make the user type the name of the folder/file and button to search
is it by an algorithm or there are any library in C# to do that give me any hints
推荐答案
你的问题不是很清楚。如果我正确使用成像:
- System.IO.DriveInfo( http://msdn.microsoft.com/en-us/library/system.io.driveinfo.aspx [ ^ ])
并使用以下课程:
- DirectoryInfo http://msdn.microsoft .com / zh-cn / library / system.io.directoryinfo.aspx [ ^ ]
- FileInfo http://msdn.microsoft.com/en-gb/library/system.io.fileinfo.aspx [ ^ ]
或问如果您需要更多信息,请详细说明。
Your question is not really clear. If I''am imaging right use:
- System.IO.DriveInfo ( http://msdn.microsoft.com/en-us/library/system.io.driveinfo.aspx[^] )
And work with the following classes:
- DirectoryInfo http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.aspx[^]
- FileInfo http://msdn.microsoft.com/en-gb/library/system.io.fileinfo.aspx[^]
Or ask detailled if you need more information.
这篇关于如何用c#搜索硬盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文