I have the following code in a desktop application :
using (StreamReader reader = new StreamReader("path\\to\\file.csv"))
{
string line;
while (!reader.EndOfStream)
{
line = await reader.ReadLineAsync();
string[] values = line.Split(',');
double.TryParse(values[pointsIndex], out double points);
}
}
The line line = await reader.ReadLineAsync()
blocks the the program entirely and makes the application unresponsive.
While debugging I noticed that it is runs 4 times and then blocks indefinitely.
This code is very simple and correct AFAIK. Why is it not working as expected?