Ramkithepower wrote:
Is this possible?
Yes - I'm not sure it's the best possible design, but it is possible. What you could do (if you are using .NET 3.5 or later) is use an ObservableCollection in the first thread which the second thread hooks into the event handlers for to see when items are added into that collection - then it can perform it's searching in response to the item changing. Alternatively, and this is perhaps a better method, you could have your first thread implement an event handler that takes the contents of the file as a parameter (assuming you are just storing it as a big string here) and the second thread hooks into that event. Obviously, you'd fire off the event every time you added a file.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Onyx