I’m using C# (.Net 2.0), and I have a fairly large text file (~1600 lines on average) that I need to check periodically to make sure a certain line of text is there.
What is the most efficient way of doing this? Do I really have to load the entire file into memory each time?
Is there a file-content-search api of some sort that I could use?
Thanks for any help/advice.
Well, you can always use the FileSystemWatcher to give you an event when the file has changed, that way you only scan the file on demand.