| Start |
|---|
| What is it? It forces you to explicitly declare all variables. What is the difference between explicitly declaring and implicitly declaring a variable? Explicitly declaring a variable: Implicitly declaring a variable: Conclusion Therefore, you should always have |
| How to switch it on? Document level It is on by default, but you can have an extra layer of protection by placing Project level You can switch it on via the menu in Visual Studio: Project > [Project] Properties > Compile Tab > Option Explicit Choose All new projects You can switch it On by default for all new Projects by selecting: Tools > Options > Projects and Solutions > VB defaults > Option Explicit Choose Remarks
with ref to https://support.microsoft.com/en-in/kb/311329#bookmark-3 (opens new window) option strict is also can be used instead of option explicit. Option strict inherits option explicit. |
Read Article
https://develop.horje.com/learn/1434/reference