if (txtMath.text >= "90")

else
if (txtMath.Text >= "80")
else if (txtMath.Text >= "70")
else if (txtMath.Text == "60")
else if (txtMath.Text == "50")
else if (txtMath.Text == "50")
MessageBox.Show ("You are failed in your exaim");
======================================================================================
It give error as below
//Error 1 Operator '>=' cannot be applied to operands of type //'string' and 'string'

Pleas help me in this matter as soon as possible

Strings can only be compared this way with the != and == operators.
If you want to use greater than or less than, use the string Compare method.

Pleas send me code for example THANKs

``````string A = "60";
string B = "80";
int i = A.CompareTo(B);``````

A < B returns -1
A = B returns 0
A > B returns 1
So in the code snippet above i will be equal to -1, because string A is "smaller" then string B.

But how i apply this code at my

``txtmath.text``

i have one text box called txtmath and i want use grade.which marks user enter example

user enter 60 in txtmath.text
how can i use it that

if(txtmath >60)
``````int intValueA = Convert.ToInt32(txtMath.Text);
``i = txtmath.text.CompareTo("80");``