Hi

I have both a Stremreader and FileSystemWatcher that works well.

What I can't figure out is how to force StreamReader to update the variable after the Watcher detects a change in the text file to which the StreamReader is pointing.

When I do a general refresh from the Watcher the StreamReader doesn't appear to be updating the variable.

Any help would be appreciated.

Bob

Depends I guess in what way you want it to "update"?
The filsystemwatcher events can be used to do a lot of things.. changes to your stream (assuming you're for example you're making a windows version of tail) you can tell to read to the new end of stream because you know its changed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.