Zeb Muhammad

Zeb Muhammad

  • NA
  • 67
  • 17.9k

Comparison of two textboxs

Aug 7 2017 2:03 AM
  1. Dear Friends,
    I want to compare two values of textboxs please, check my code

    1. Int32 val11 = Convert.ToInt32(textBox4.Text);
    2. Int32 val22 = Convert.ToInt32(textBox10.Text);
    3. if(val11 >> val22)
    4. {
    5. MessageBox.Show("Please, check Maximum Limit of Quantity.Quantity should be less tha fix Limit", "Limit", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning);
    6. textBox15.Focus();
    7. textBox4.ForeColor = Color.Red;
    8. }
    9. else
    10. {
    11. textBox4.ForeColor = Color.Green;
    12. }

    I got error.

    Error CS0029 Cannot implicitly convert type 'int' to 'bool'


Answers (6)