I am messing around with C# and am making a prototype GUI (with no game attached, just messing around with buttons and button colors). I'm running into an error:
private void temperValue_Load(object sender, EventArgs e)
{
int temperInt = 23;
temperInt = Convert.ToInt32(temperValue.Text);
if (temperInt >= 70)
{
temperButton.BackColor = System.Drawing.Color.Red;
}
else if (temperInt >= 40 & <= 69)
{
temperButton.BackColor = System.Drawing.Color.DarkOrange;
}
}
On the "else if" line, I have an error from both the "<=" and the "69)". The "<=" error is "Invalid expression term '<='", and the four errors for the "69)" is ") expected", "Invalid expression term ')'", and two "; expected" errors.
There are no variables outside of this snippet of code that are affecting this code. Every variable called is defined inside the snippet.
(For anyone curious, "temper" stands for "Temperature")