private void txtPagaCon_TextChanged_1(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(txtPagaCon.Text)) { funciones.KeyNumber(sender); if (string.IsNullOrEmpty(txtPagaCon.Text)) { txtPagaCon.Text = "0.00"; } else { txtPagaCon.Text = txtPagaCon.Text; } var monto = double.Parse(txtTotalAPagar.Text); var pagaMonto = double.Parse(txtPagaCon.Text); txtVuelto.Text = (pagaMonto - monto).ToString("N2"); } } catch (Exception ex) { } }