Trying to Do a Search in the Background without the UI being Impacted...but I can't seem to find anything to explain how to do invokes or if that's even what i need?
Here's my Code:
Thread backgroundThread = new Thread(
new ThreadStart(() =>
{
foreach(string file in Directory.EnumerateFiles(@"\\" + environment
+ @"VRoot\", "*.zip", SearchOption.AllDirectories).Select(Path.GetFileName))
{
Console.WriteLine(file);
//how do i add these files to a ComboBox back on the UI?
}
MessageBox.Show("Thread Completed!");
}));
backgroundThread.Start();
Please let me know HOW would i make that call to the origional?