How do i wait my method for a task to complete before the method returns.
public async void barcodescanner()
{
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
barcode = await scanner.Scan();
}
Definition of scaner.Scan():
public Task<Result> Scan();