Move your
int count = (int)button.Tag;... line lower:
void button_Click(object sender, EventArgs e)
{
Button button = (Button)sender;
int count = (int)button.Tag;
if (count < 3)
[UPDATED]
void button_Click(object sender, EventArgs e)
{
Button button = (Button)sender;
int count = (int)button.Tag;
if (count < 3)
{
count++;
if (count == 1)
{
button.Text = "a";
}
if (count == 2)
{
button.Text = "b";
}
if (count == 3)
{
button.Text = "c";
}
button.Tag = count;
}
}
I hope it helps you.