I'm trying to do the following: if the guess value ( _TextValPalite
) is enabled then it will check if that number is not different from a minimum value and a maximum value.
Ex: between 1 and 10 I can write 5, but not 11.
if(_TextValPalite.Enabled)
{
if (Convert.ToInt32(_TextValMin.Text) & Convert.ToInt32(_TextValMax.Text) != Convert.ToInt32(_TextValPalite.Text))
{
MessageBox.Show("Você não pode fazer isso");
return;
}
}
But it returns this error:
Operator '&' cannot be applied to operands of type 'int' and 'bool'
I can do + - * / operations normally, but how do bool
interpret this? turning it into a int
? how could I do that?