I have an application with 20 textboxes, i need to do the calculations for example ((TextBox12 * TextBox1 * TextBox7) / 2) and display the result on label when clicking a button.
Ive usually done these like this:
private void lBtn_Click(object sender, EventArgs e) { double L, L2; if (double.TryParse(kTb1.Text, out L) && double.TryParse(kTb2.Text, out L2)) lBl4.Text = String.Format("{0:f1}", (L2 * L)); else MessageBox.Show("WTF?"); } [/CODE]
I was wondering if there is better way to do this so that I don't have to add all 20 textboxes into this with && double.TryParse?
Sadly were trying to speedrun to the levels of surveillance China has. It seems to be one of the things the only two parties that have been in power for the last 100 years agree on too.
Appreciating this guide is for HP Laptops but here's how to update the UEFI certificate database manually whether the OEM supports it or not:
https://h30434.www3.hp.com/t5/Business-Notebooks/Enabling-new-UEFI-2023-CA-certificates-in-pre-2018-HP/td-p/9628370
We will soon have had 7 different Prime Minister's over the course of a decade. I don't care about political leanings, Tory, Labour, Green or Retarded, this just makes a mockery of the role!
UK is going the opposite direction, they're mandating AI installed to check photos and messages sent on the device at OS level to 'protect the children'.
Question
Joni_78
Hi,
I have an application with 20 textboxes, i need to do the calculations for example ((TextBox12 * TextBox1 * TextBox7) / 2) and display the result on label when clicking a button.
Ive usually done these like this:
I was wondering if there is better way to do this so that I don't have to add all 20 textboxes into this with && double.TryParse?
Link to comment
https://www.neowin.net/forum/topic/1083591-c-calculating-textbox-values/Share on other sites
17 answers to this question
Recommended Posts