2013-05-12 72 views
0

我搜索了互聯網,並找不到解決方案。這是我可以發展自己的最好方式。但我在第一行發生錯誤。我得到這個錯誤:Xamarin(Mono)中的Alertdialog錯誤Android

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(); 

回答

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

我希望這會幫助別人:)