Asynchronous method 'anonymous' should not return void

  • Thread starter Thread starter Markus Freitag
  • Start date Start date
M

Markus Freitag

Guest
Hello,
I call an asynchronous function from a synchronous function. It works, but a warning is still issued.
How do I solve this correctly, not that I'll get in trouble later.

This is not clear

Thanks for help.




Greetings Markus



protected override void Data(InputA input)
{
ScanOrderNo(value);


protected async void ScanOrderNo(string value)
{
COrder = new Order();

ResponseScada response = null;
response = await LScada.GetResponseInfosAsync();

public async ResponseScada GetResponseInfosAsync()
{
while (!IsAFileExist(out useFile, out fileName))
{
await Task.Delay(1000);

//..
}
ResponseScada ret = new ResponseScada ();

Continue reading...
 
Back
Top