#2 - Data Types and Variables

Module Module1

    Sub Main()  'A variable is a bucket in the computers memory that you can story data in and retrieve data out of it, the data being declared in the code. 

        'X = 7   , this needs to be rewritten so Visual Basic knows 
        'Y = X + 3
        Dim x As Integer 'Dim is short for Dimension, this will declare variables datatypes 
        ' With this we are declaring a variable as x and this variable will be an integer
        Dim y As Integer
        'Integers story numbers, 4.3billion is the max in 32bit (2^32), if you consider above and below 0, that gives us +-2,147,483,648 as a max for an integer in a regular bucket
        x = 7 'set the integer named x as 7
        y = x + 3 'store the result of x + 7 as y

        'here we will demonstrate string datatypes
        Console.WriteLine("What is your name?")  'displays the string "What is your name?" in the console window
        Console.Write("Type your first name: ")  'prompts the user to enter their name, later stored as variable myFirstName
        Dim myFirstName As String = Console.ReadLine() 'declares the variable myFirstName as a string datatype
        'gets a string from  console and stores as a variable myFirstName

        Console.Write("Type your last name: ") 'gets a string to be stored later as myLastName
        Dim myLastName As String = Console.ReadLine()  'declares the variable myLastName as a string
        'gets a string from console and stores as a variable myLastName

        Console.WriteLine("Hello," & myFirstName & " " & myLastName)  '& concatonates stuff

    End Sub
End Module