Private Sub btnStaticVar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStaticVar.Click
Static cntStatic As Integer = 0
MessageBox.Show("This is my Static Variable"cntStatic )
cntStatic += 1
End Sub
Private Sub btnNonStaticVar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNonStaticVar.Click
Dim cntNonStatic As Integer = 0
MessageBox.Show("This is my Non Static Variable"cntNonStatic )
cntNonStatic += 1
End Sub
Comments