Mega Code Archive

 
Categories / VB.Net Tutorial / Language Basics
 

Module global variable

Module Module1     Sub Main()         For intLoopIndex As Integer = 0 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 1 2 3 4 5 6