Hello !!
i am new to coding and i am writing code in visual studio using c#.
I run a process there (basically double clicking a file which internally runs and give us output as text file).
In next line i wrote a code for getting that text file created as a result of process.
The problem is process running and giving text file as output take some seconds and mean while the next file which is getting text file says null. Because creation of text file need some seconds. Is there any method i can put a break or something so that when process.run is completed then next line of code should run.
Here is my code lines:
Process.Start(@"D:\example.gms");
List<string> lines = File.ReadAllLines(@"D:\My.txt").ToList();
i am new to coding and i am writing code in visual studio using c#.
I run a process there (basically double clicking a file which internally runs and give us output as text file).
In next line i wrote a code for getting that text file created as a result of process.
The problem is process running and giving text file as output take some seconds and mean while the next file which is getting text file says null. Because creation of text file need some seconds. Is there any method i can put a break or something so that when process.run is completed then next line of code should run.
Here is my code lines:
Process.Start(@"D:\example.gms");
List<string> lines = File.ReadAllLines(@"D:\My.txt").ToList();