سلام و درود بر تمامی برنامه نویسان c# ، کد جستجو (search) فایل در هارد در سی شارپ c#.net رو براتون قرار دادم.انشاالله که این آموزش به دردتون بخوره و مورد استفاده قرارش بدین.
این هم کد برنامه:
int num = 0;
string drives = "";
System.Collections.ArrayList arr = new System.Collections.ArrayList();
this.listBox1.Items.Clear();
arr.Add("d:\");
//Get Client Drives List
foreach(string d in System.IO.Directory.GetLogicalDrives())
{
drives += d + "\n";
}
MessageBox.Show(drives); // Show Drives List
//Searching *.* in Selected Path
if(arr.Count != 0)
{
for(int i = 0; i != arr.Count;i++)
{
string drives = "";
System.Collections.ArrayList arr = new System.Collections.ArrayList();
this.listBox1.Items.Clear();
arr.Add("d:\");
//Get Client Drives List
foreach(string d in System.IO.Directory.GetLogicalDrives())
{
drives += d + "\n";
}
MessageBox.Show(drives); // Show Drives List
//Searching *.* in Selected Path
if(arr.Count != 0)
{
for(int i = 0; i != arr.Count;i++)
{