G
Guest
the first and third methods are in a usercontrol object.
txtValue is a TextBox
the float.parse in the if statement on line 3 always works fine.
the second float.parse in the third method is quirky: if the program just
runs it will always break on that line, vc# 2005 beta2 shows txtValue.Text as
null at this point.
However, if I put a breakpoint on the first float.parse (on line 3), and
then step out until i reach the second float.parse, it reports the correct
text value, and the program works as expected.
private void txtValue_TextChanged(object sender, EventArgs e)
{
if (float.Parse(this.txtValue.Text) > 0)
// Call calculation checking class
Form1.SolveCheck();
}
public static void SolveCheck()
{
A = angleA.Value();
B = angleB.Value();
C = angleC.Value();
}
public virtual Corner Value()
{
if (this.Angle)
{
Corner temp = new Corner(float.Parse(this.txtValue.Text),
cmbType.SelectedIndex);
return temp;
}
else { return Corner temp = new Corner(-1.00, -1); }
}
does anyone have any idea what's going on / what im doing wrong?
thank you
txtValue is a TextBox
the float.parse in the if statement on line 3 always works fine.
the second float.parse in the third method is quirky: if the program just
runs it will always break on that line, vc# 2005 beta2 shows txtValue.Text as
null at this point.
However, if I put a breakpoint on the first float.parse (on line 3), and
then step out until i reach the second float.parse, it reports the correct
text value, and the program works as expected.
private void txtValue_TextChanged(object sender, EventArgs e)
{
if (float.Parse(this.txtValue.Text) > 0)
// Call calculation checking class
Form1.SolveCheck();
}
public static void SolveCheck()
{
A = angleA.Value();
B = angleB.Value();
C = angleC.Value();
}
public virtual Corner Value()
{
if (this.Angle)
{
Corner temp = new Corner(float.Parse(this.txtValue.Text),
cmbType.SelectedIndex);
return temp;
}
else { return Corner temp = new Corner(-1.00, -1); }
}
does anyone have any idea what's going on / what im doing wrong?
thank you