I'm sure this is a general dotnet issue but I haven't been able to do a good search on the problem. Maybe you can help me work through this problem.
My main looks like this: static async Task Main(string[] args) since I am calling async methods elsewhere.
When I try to use either:
while (reader.MoveNext())
{
var row = reader.Current;
}
or
foreach (var row in reader)
{
}
The error occurs at the definition of the row, CS4012 Parameters or locals of type 'SepReader.Row' cannot be declared in async methods or async lambda expressions.
@nietras
I'm sure this is a general dotnet issue but I haven't been able to do a good search on the problem. Maybe you can help me work through this problem.
My
main
looks like this:static async Task Main(string[] args)
since I am calling async methods elsewhere.When I try to use either:
or
The error occurs at the definition of the
row
,CS4012 Parameters or locals of type 'SepReader.Row' cannot be declared in async methods or async lambda expressions.
Suggestions are welcome.