1. Create new android project and run it through emulator.
2.Drag a button to designer and name it to btnTest
3.Paste the code in MainActivity.cs
[Activity(Label = “App1”, MainLauncher = true, Icon = “@drawable/icon”)]
public class MainActivity : Activity
{
int count = 0;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the “main” layout resource
SetContentView(Resource.Layout.Main);
// Create your application here
Android.Widget.Button button = FindViewById
button.Text = string.Format(“{0} clicks!!”, count);
button.Click += delegate {
button.Text = string.Format(“{0} clicks!!”, ++count);
Toast.MakeText(this, “Hello Clicked”, ToastLength.Short).Show();
//Toast.MakeText()
};
}
}