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?
I used it yesterday to create an ISO, then I mounted it just to check the build number, and it was 26200.8653 which I couldn't find any info about, I knew the latest Patch Tuesday biuld was 26200.8655.
Can Confirm, this only appears to happen on Edge installed on Android, No issue on Chrome, Firefox, Samsung Browsers.
Android 16
Samsung OneUI 8.5
Newest Releases of Each Browser (Edge, Firefox, Chrome, Samsung Browser)
This happens both With and Without my VPN being active.
Yay, a forced new tab telling everyone edge just updated with a load of advertising in it twice as often as we currently get it. That'll never be abused. 😏
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