1
Answer

how to search the hard disk with c#

aya omar

aya omar

11y
1.3k
1
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 file dialog 
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 :)
Answers (1)
0
Javeed M Shaikh

Javeed M Shaikh

NA 7.8k 69.7k 11y
yes you can use the following for file handling:

include this 
System.IO;

you have the following methods:

File.Exists --> to check if the file exists
File.Delete --> to delete the file
File.Open --> to open the file.