Option Strict on by default in VB.NET
In Visual Studio, go menu Tools -> Options -> Projects and Solutions -> VB defaults -> Option Strict. Set it to “On”. Every time you create a new project, it will have Option Strict On by default.
In Visual Studio, go menu Tools -> Options -> Projects and Solutions -> VB defaults -> Option Strict. Set it to “On”. Every time you create a new project, it will have Option Strict On by default.
The equivalent is Object in VB.NET but with Option Strict Off. With Option Strict On there’s no equivalent. Put another way the dynamic keyword brings Option Strict Off equivalent functionality to C#.
Option Explicit means that all variables must be declared. See here. Without this, you can accidentally declare a new variable just by misspelling another variable name. This is one of those things that cause a lot of grief as you’re trying to debug VB programs and figure out why your program isn’t working properly. In … Read more