Make A Program Using Static Keyword on VB.net

STATIC keyword can be used to create continuous Programs on Visual Basic


To Create This Program ..
Get
Timer Control & Label Control

Make Properties on Timer Control as..
Enabled = True
Interval = 200

Write These Codes on Timer Control

Static Y As Integer
        Y = Y + 1
        If Y = 1 Then Label1.Text = "Kasun"
        If Y = 2 Then Label1.Text = "K asun"
        If Y = 3 Then Label1.Text = "K a sun"
        If Y = 4 Then Label1.Text = "K a s un"
        If Y = 4 Then Label1.Text = "K a s u n"
        If Y = 5 Then Label1.Text = "K a s un"
        If Y = 6 Then Label1.Text = "K a sun"
        If Y = 7 Then Label1.Text = "K asun"
        If Y = 8 Then Label1.Text = "Kasun"
        If Y = 9 Then Y = 0

Having studied this article you will be able to understand behavior of Static Keyword

After, Try to make your own program!



Published By: Kasun Madhusanka