c# - Most efficient way to make sure a line exists in a plain text file -


I am using C # (.Net 2.0), and I have a large text file (on average ~ 1600 lines) I need to check from time to time to ensure that a certain line of text exists.

What is the most effective way to do this? Do I really have to load the whole file in memory every time?

Is there a file-content-search API that I can use?

Thanks for any help / advice.

OK, you can always use that event when the file has changed, the way From you only scan the file on demand.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -