I want a button that can display another message for a toast, depending on the time the user clicks. The code I'm writing is as shown below. However, after I click, all four toasts will appear. Can someone help me fix this? thank!
GetVS.Click += delegate {
if(count==0)
{
Toast.MakeText (this, "Beep Boop0", ToastLength.Short).Show ();
}
if(count==1)
{
Toast.MakeText (this, "Beep Boop1", ToastLength.Short).Show ();
}
if(count==2)
{
Toast.MakeText (this, "Beep Boop2", ToastLength.Short).Show ();
}
else
{
Toast.MakeText (this, "Beep Boop else", ToastLength.Short).Show ();
}
count++;
};
source
share