I am trying to make a like and a dislike button. The like button works perfectly but when the dislike button is clicked it doesnt do anything and when it is clicked again it removes a like. What can I do to fix this problem; I have a like button(iconButton1) a dislike button(iconButton1) and a label(label1).
int i;
int like;
int dislike;
private void iconButton1_Click(object sender, EventArgs e)
{
like = i ++ ;
label1.Text = like.ToString();
}
private void iconButton2_Click(object sender, EventArgs e)
{
dislike = like -- ;
label1.Text = dislike.ToString();
}