我正在尝试使用Dictionary
。但我不知道该怎么做。这是我到目前为止所拥有的。你能帮忙吗?
Dictionary<string, FileInfo> list = new Dictionary<string, FileInfo>();
openFileDialog1.Multiselect = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
foreach (string file in openFileDialog1.FileNames)
{
list[file] = new FileInfo(file);
//fi = new FileInfo(file);
// listBox1.Items.Add(string.Format("File Name :{0} FileSize : {1}", list.Name, list.Length.));
}
}