I'm currently creating a note taking application. I'm trying to add items to a listbox without their file extensions, I have tried GetAllFilesWithoutExtensions, but no luck. I'm currently able to add them but can't seem to remove the extension. Any advice would be greatly appreciated...
DirectoryInfo dir = new DirectoryInfo("../Debug/");
FileInfo[] files = dir.GetFiles("*.txt");
foreach (FileInfo file in files)
{
listBox1.Items.Add(file);
}