I am new to programming and I ran into a problem and I am not sure how to deal with it.
I am using string
textBox2.Text = System.IO.File.ReadAllText(path);
To read from a text file and paste content into textBox2.
Now the problem is that the text file I'm trying to read is a large (a couple of megabytes) text file. This text file contains the logs from the program, new entries are always added at the bottom of the file.
Now I want to update textBox2 if the text file is updated. However, I am not sure how to do this in an efficient way. One way is to simply read the entire text file again, but since the text file is so large, it is a very slow process.
I am interested in learning a different and faster way to handle this. I am not interested in the exact code, I was just hoping to find out in which direction I should look and which options I can consider.
Brick source share