I have a ComboBox automatically list all the HTML files located in the same directory as my application. But I can't figure out how to update the Combobox in realtime while the application is running if a new HTML file is added to the directory.
string path = AppDomain.CurrentDomain.BaseDirectory;
string[] filePaths = Directory.GetFiles(path, "*.html");
foreach (string file in filePaths)
{
HTMLFiles.Items.Add(Path.GetFileName(file));
}
How can I update this to add new HTML files in realtime?