System.IO.IOException: 'The process cannot access the file '@.txt' because it is being used by another process.'
I am new to programming and I have a question. If I have two functions, one creates a text file and writes into it, while the other opens the same text file and reads from it. The error I get is: System.IO.IOException: 'The process cannot access the file '@.txt' because it is being used by another process.' I have tried setting seperate timers to each of the functions but it still does not work. I think the best way would be that the function two does not start until function one ends. Can you help me achieve this? Thank you very much! Mike Source code: public Form1() { InitializeComponent();