This question already has an answer here:
How can I convert String to Int?
int RTPower = Int32.Parse(powerTextBox.Text);
or for decimal values
decimal RTPower = Decimal.Parse(powerTextBox.Text);
You need to convert the value from a string to an int.
Also, I assume you are new to c# - my advice would be to avoid using var and explicitly declare your variables. It will make things clear and easier for you to learn and understand.
You can convert to int like
int x = Int32.Parse(RTPower);
then you can compare x.
If, however, you know that the user input will be between [0, 9] then you could use
if(RTPower >= "0" && <= "1")
because strings are compared lexicographically so "1" is under "9" but "10" is under "2".
The first way is much better though, because it works for all numerical user inputs