i am doing one of the project from visual basic 2010 book.These are the requirements:
Workshop Selector:
3 list boxes, 4 buttons, 2 labels.
The application allows the user to select a workshop from lstWorkshop, Then select a location from lstLocation. Next btnAdd takes the selected workshop and location attached to a set amount of days and a registration fee and multiplies the days by a Lodging fee and outputs this number in dollar form. After multiple workshops/locations have been added btnCalc adds each of these and places them in lblTotal. The other two buttons are exit and clear which have already understand (of course the "easy" stuff)
i have finished most of the codings and it works ok, but now i need to code btnCalc (the final calculation) and i am planing on using the For.....Next Loop to do this calculation
my question is
if this is my code for the btnCalc button
how do i setup the intcount? over here saying saying 1 to 100 would be incurrect i think
How do i set it to infinity or should i set it to infinity ?
Code:
Dim intcount As Integer ' Loop counter
Dim intTotal As Integer = 0 ' Accumulator
'Add the numbers 1 through wat?
For intCount = 1 To 100
intTotal += intcount
Next
' Display the sum of the numbers.
lblcost.Text = intTotal.ToString("C")