I am trying to compare the background image of previousButton(a button reference) to the background image of Bpown(a button) but the if will not work.
I have tried changing a button's background image to previousButton's BackgroundImage and it worked so it is not connected to the problem.
void click()
{
if (turn == true)
{
if (previousButton.BackgroundImage == Bpown.BackgroundImage)
{
//unreachable code
}
}
}
EDIT: This is a windows form project