.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> VB.Net >> Post New Question Subscribe to Interview Questions

What is Optional Explicit in VB.net ?

Posted By :Srikanth     Posted Date :April 21, 2011    Points :40   Category :VB.Net 
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


You can also find related Interview Question to What is Optional Explicit in VB.net ?  below: 

How do I simulate optional parameters to COM calls?

  
You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. (More...)

Why do we use Option Explicit?

  
Correct answer is - This statement force the declaration of
variables in VB before using them. (More...)

What is the CIL representation of implicit and explicit keywords in C#?

  
The CIL representation is op_Implicit and op_Explicit respectively. (More...)

When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?

  
In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.
(More...)

Did VbScript supports both explicit and implicit constants.

  
VBScript supports both explicit and implicit constants. (More...)

Can we pass optional argument to function in VBScript?

  
Yes, We can pass optional argument to VBScript functions.We can use optional argument in VBScript by specifying optional keyword. (More...)

Define Optional and Named Parameter in C# 4.0

  
Optional parameter allows omitting arguments to function while named parameters allow passing arguments by parameter name. (More...)

What is the use of Option explicit?

  
Variable must be compulsorily declared when the Option Explicit is termed as ON. If it is OFF, variables can be used without declaration. (More...)

What is the use of Option explicit?

  
Variable must be compulsorily declared when the Option Explicit is termed as ON. If it is OFF, variables can be used without declaration (More...)

What is implicit cast and explicit cast in .Net?

  
Implicit cast allows conversion without any loss of data and it takes place only when there is no possible of loss of data. When there is any possibility of loss of data, explicit cast is required. Remember, explicit cast if not applied properly can result a loss of data precision. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend