I am having trouble with this math problem:
lsamount.Items.Add(String.Format("{0:n}", Val(exp_amount.Text)))
In my Timer code:
For i = 0 To lsamount.Items.Count - 1
TOT = TOT + Val(lsamount.Items(i))
Next i
totalamount.Text = TOT.ToString
Is there any simplest way to add this 2?
Here's another suggestion and only one line of code and no looping... This uses
Linq
to accomplish this.