A
Alexander M. Polak
One of our students wrote on a vb web form
Public intIndex As Integer = 0
Private Sub btSet_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btSet.Click
intIndex = 2
lblOriginal.Text = "intIndex = : " & CType(intIndex, String)
End Sub
Private Sub btAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btAdd.Click
intIndex += intIndex
lblResult.Text = "intIndex = : " & CType(intIndex, String)
End Sub
Clicking on the button set wil seed the integer int Index with 2
Clicking on the Add button adss the index to it's self
Both times de value is displayed on the screen.
Strait forward no?
Cliking the btAdd displays a "0" Why?????
Public intIndex As Integer = 0
Private Sub btSet_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btSet.Click
intIndex = 2
lblOriginal.Text = "intIndex = : " & CType(intIndex, String)
End Sub
Private Sub btAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btAdd.Click
intIndex += intIndex
lblResult.Text = "intIndex = : " & CType(intIndex, String)
End Sub
Clicking on the button set wil seed the integer int Index with 2
Clicking on the Add button adss the index to it's self
Both times de value is displayed on the screen.
Strait forward no?
Cliking the btAdd displays a "0" Why?????