上生成的异常MessageBox
。如何MessageBox
在async
方法中使用?
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!");
}
}