There is a list
List<string> lst = new List<string>();
Every 5 minutes I bring the data there.
In half an hour I write the data to the file and I want the file to have a limit on the number of lines. Suppose there are no more than 1000 lines in the file.
Question
How to logically think through logic without creating buffer tables, counting the current number, etc. How can I override the StreamWriter method? Say, is an elegant solution.