while (!sr.EndOfStream)
{
n++;
sr.ReadLine();
}
codeInfo a = new codeInfo(n, extCur, fCur.Name, fCur.FullName); //存储这个文件的信息
list.Add(a); //将该文件信息加入到集合列表中
}
}
count(ext,dCur.FullName,ref list); //递归遍历子目录的子目录
}
}
2、button2的部分代码
注:codeList为Arraylist集合
private void button2_Click(object sender, EventArgs e)
{
string[] ext = getExt(textBox1.Text);
listBox1.Items.Clear();
codeList.Clear();

发表评论