Turn Explicit off to use variable without declaration : Option Explicit « Language Basics « VB.Net Tutorial






Option Explicit Off

Module Module1

    Sub Main()
        EmployeeName = "Buddy Jamsa"
        EmployeePhoneNumber = "555-1212"
        EmployeeSalary = 45000.0
        NumberOfEmployees = 1

        Console.WriteLine("Number of employees: " & NumberOfEmployees)
        Console.WriteLine("Employee name: " & EmployeName)
        Console.WriteLine("Employee phone number: " & EmployeePhoneNumber)
        Console.WriteLine("Employee salary: " & EmployeeSalary)

    End Sub

End Module
Number of employees: 1
Employee name:
Employee phone number: 555-1212
Employee salary: 45000








1.8.Option Explicit
1.8.1.Cause compiler error when Option Strict On
1.8.2.Option Explicit Off
1.8.3.Turn Explicit off to use variable without declaration