Dear Friends,I want to compare two values of textboxs please, check my code
Int32 val11 = Convert.ToInt32(textBox4.Text); Int32 val22 = Convert.ToInt32(textBox10.Text); if(val11 >> val22) { MessageBox.Show("Please, check Maximum Limit of Quantity.Quantity should be less tha fix Limit", "Limit", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning); textBox15.Focus(); textBox4.ForeColor = Color.Red; } else { textBox4.ForeColor = Color.Green; }
Int32 val11 = Convert.ToInt32(textBox4.Text);
Int32 val22 = Convert.ToInt32(textBox10.Text);
if(val11 >> val22)
{
MessageBox.Show("Please, check Maximum Limit of Quantity.Quantity should be less tha fix Limit", "Limit", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning);
textBox15.Focus();
textBox4.ForeColor = Color.Red;
}
else
textBox4.ForeColor = Color.Green;
I got error.
Error CS0029 Cannot implicitly convert type 'int' to 'bool'