C# Xamarin(Mono)Android中的Alertdialog错误

C# Xamarin(Mono)Android中的Alertdialog错误,c#,android,xamarin.android,xamarin,C#,Android,Xamarin.android,Xamarin,我在网上搜索,找不到解决办法。这是我能培养自己的最好方法。但我在第一行有错误。我得到这个错误: Error CS0428: Cannot convert method group 'Create' to non-delegate type 'Android.App.AlertDialog'. Did you intend to invoke the method? (CS0428) 我的代码是: AlertDialog alertMessage = new AlertDialog.Builde

我在网上搜索,找不到解决办法。这是我能培养自己的最好方法。但我在第一行有错误。我得到这个错误:

Error CS0428: Cannot convert method group 'Create' to non-delegate type 'Android.App.AlertDialog'. Did you intend to invoke the method? (CS0428)
我的代码是:

AlertDialog alertMessage = new AlertDialog.Builder(this).Create;

alertMessage.SetTitle("MobileSecure Key:");

alertMessage.SetMessage(cipherText);

alertMessage.Show();

一个简单的答案是尝试通过添加一些括号来调用该方法
Create()


除此之外,还有一个极好的对话框介绍,其中包括许多示例,这些示例演示了如何在

处调用对话框。一个简单的答案是尝试通过添加一些括号来调用该方法
Create()

除此之外,还有一个极好的对话框介绍,包括许多示例,演示如何在

我希望这会对某人有所帮助:)

我希望这会对某人有所帮助:)

AlertDialog.Builder alert = new AlertDialog.Builder(this);
        alert.SetTitle("msgConfirm");
        alert.SetMessage("msgSureExit");            
        Dialog dialog = alert.Create();
        dialog.Show();