The exception thrown in the MessageBox. How can I use MessageBox in async method?
private async void Purchheard(object sender,EventArgs e){ Debug.WriteLine(" "); try{ await CurrentApp.RequestProductPurchaseAsync(ID,false); if(license.ProductLicenses[ID].IsActive){world.is_freemium=false;} }catch (Exception ex){ MessageBox.Show("Finished!"); }
source share