Forum General

app crashes if editText is string.Empty

Dear all
in my application below are codes

private void Bt_Click(object sender, EventArgs e)
double x = double.Parse(et1.Text);
double y = double.Parse(et2.Text);
double z = Math.Round(y / ((x / 100) * (x / 100)));
et1 and et2 are EditText and if both edit text field is empty then app get crash.
please guide.


Best Answer


  • vkt_rbvkt_rb USMember ✭✭✭

    Hi @SunilBhagwat , could you post I screenshot of the error when the app crashes to see what is going on.

Sign In or Register to comment.