Friday 16 September 2011

Module global variable

Module Module1

    Sub Main()
        For intLoopIndex As Integer = To 5
            System.Console.WriteLine(Tracker())
        Next intLoopIndex
    End Sub

    Dim intCount As Integer

    Function Tracker() As Integer
        intCount += 1
        Return intCount
    End Function

End Module

No comments:

Post a Comment