I have a method
public async void getResult ()
That relies on 2 await responses inside of it.
This is the 1st: await:
await System.Threading.Tasks.Task.Factory.StartNew (() => {
try
{
scannedItem = getScannedItem();
}
catch (Exception exe)
{ }
And the 2nd await await call that uses scannedItem from above
await System.Threading.Tasks.Task.Factory.StartNew (() => {
try
{
getResultsScannedItem = results(ScannedItem);
}
catch (Exception exe)
{ }
I want to have this all execute from one button. However, the second await never gets executed. Can I even have two awaits inside a method? Bit confused on how to go about doing this.
await Task.Factory.StartNew( ()=> { try { scannedItem = getScannedItem(); getResultsScannedItem = result( scannedItem ); } ...