In the example below, the variable passedText is set to the Boolean value true. The expression in the if statement is therefore true and the passImage.Show() statement will run and not the failImage.Show() statement
var passedTest = true
if (passedTest)
{
passImage.Show()
}
else
{
failImage.Show()
}