Saturday, September 17, 2011

static Variable

Option Strict On

Public Module Test
   Public Sub Main()
      For loopCtr As Integer = to 10
         Console.WriteLine(Invocations())
      Next
   End Sub

   Private Function Invocations() As Integer
      Static i As Integer
      i += 1
      Return i
   End Function
End Module

No comments:

Post a Comment

Explain the different parts that constitute ASP.NET application.

Content, program logic and configuration file constitute an ASP.NET application. Content files Content files include static text, images ...