как получить имя файла без расширения в список ? - Спасибо;
PopulateListBox(listBox1, @"C:\test", "*.*");
}
private void PopulateListBox(ListBox lsb, string Folder, string FileType)
{
DirectoryInfo dinfo = new DirectoryInfo(Folder);
FileInfo[] Files = dinfo.GetFiles(FileType);
foreach (FileInfo file in Files)
{
lsb.Items.Add(file.Name);
}
}
private void listBox1_MouseClick(object sender1, MouseEventArgs e)
{
Process.Start(@"EXCEL.EXE", (@"C:\test") + @"\" + (sender1 as ListBox).SelectedItem.ToString());
}
private void listBox1_SelectedIndexChanged(object sender1, EventArgs e)
{
}
private void listBox1_SelectedIndexChanged_1(object sender, EventArgs e)
{
}