What is Optional Explicit in VB.net ?

 Posted by Chvrsri on 10/28/2010 | Category: VB.NET Interview questions | Views: 5085 | Points: 40

When a variable is assigned with Option Explicit the variable must and should be declared .

Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear. If you do not use the Option Explicit statement, all undeclared variables are of Object type.

Usage :

Option Explicit On

Source: My Own | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response