#3 - If-Then Logic

Module Module1

    Sub Main()  'adding conditional logic to our operations

        'Console.WriteLine("Bob's Big Giveaway!") 'display a string in console
        'Console.Write("Would you prefer what is behind door number 1,2 or 3?") 'gets user input
        'Dim userValue As String = Console.ReadLine()  'stores console data as string variable userValue

        'Dim message As String = ""  'declares variable message as String datatype, stores message as string ""
        'If userValue = "1" Then      'checks if stringtype variable userValue is "1", if true then execute line 11, if false execute line 12
        '    message = "You won a new car!"
        'ElseIf userValue = "2" Then 'Else If creates another check in the If-Then statement
        '    message = "You won a new boat!"
        'ElseIf userValue = "3" Then 'Else If creates another check in the If-Then statement
        '    message = "You won a new cat!"
        'Else  'catch-all 
        '    message = "bad input! Please play again"

        'End If
        'Console.WriteLine(message)  'writes then displays the stringtype variable message
        'Console.ReadLine()

        Console.WriteLine("Bob's Big Giveaway!")
        Console.Write("Would you prefer what is behind door number 1,2 or 3?")
        Dim userValue As String = Console.ReadLine()

        Dim message As String = ""
        message = IIf(userValue = "1", "Car", "Cat")
        Console.WriteLine("You won a {0}!", message)  'curly brackets {} act as a replacement string that is replaces with var message
        Console.ReadLine()
    End Sub

End Module