Newbie question

madubuko

New member
Joined
Nov 22, 2011
Messages
1
Programming Experience
Beginner
Hi guys, i just started learning VB today...
i have this issue with casting....is there anyway i could pass an integer into a label...this is what i have done so far but i am getting this error "A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll"


Dim firstNumber As Integer
Dim secondNumber As Integer


Dim solution As Integer


firstNumber = 1
secondNumber = 100


solution = CInt(tFirstNumber.Text) + CInt(tSecondNumber.Text)
lblResult.Text = solution



thanks for your help
Buko
 
Back
Top