C# What am I doing wrong?
Posted on 2012-08-17
Hello, I need some help to figure out why I'm not getting the expected results from the code below?
double D47 = double.Parse(txtD47.Text);
int D48 = Convert.ToInt32(txtD47.Text);
if (D48 <= 3)
txtD47.StateActive.Border.Color1 = Color.Red;
The value in txtD47.Text is 79 and the code changes the Border of field txtD47 to Red. My thinking is it should make no changes to the Border and the default color set in the properties should be the Border color.
If I hard code and set the value of D48 to 79 (D48 = 79;) all works as expected and the Border of txtD47 shows the default color set in the properties.
Any help appreciated.