Example : How to Declare Global Variables in VB .Net 2013
Public Class Form1
    
    Dim x1, x2, x3 As Integer
    Dim p As Integer = 25
    Dim y As Single = 123.004
    Const PI as double = 3.141
    Dim z As String = "Welcome"
    Dim y1, y2 As Long, z1, z2 As Double
    Dim a As Integer, b As Integer, c As Integer
    Dim a As Integer, b As String, c As Double
    Dim dob As Date
    Dim dob As Date = #08/03/1982#
    Dim attendance As Boolean

    Dim userName As String = Textbox1.Text
    Dim sname As String = Textbox2.Text    

    Dim userName As String = Nothing

End Class

Loading

Categories: VB .Net Codes

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.