3
現在我試圖用C#在Android應用程序上創建一個Alert Dialog。不幸的是我得到這個錯誤:這個調用在下面的方法或屬性之間是不明確的:`Android.App.AlertDialog.Builder.SetPositiveButton
The call is ambiguous between the following methods or properties: `Android.App.AlertDialog.Builder.SetPositiveButton(string, System.EventHandler<Android.Content.DialogClickEventArgs>)' and `Android.App.AlertDialog.Builder.SetPositiveButton(string, Android.Content.IDialogInterfaceOnClickListener)' (CS0121) (App)
這是我的代碼:
var alert = new AlertDialog.Builder(this).SetTitle("Title").SetMessage("Message").setPositiveButton("OK", null);
alert.Show();
return true;
我在做什麼錯?
將「null」投射到Android.Content.DialogClickEventArgs。 – Luksprog 2013-03-06 09:49:16