This is switched on by default. - CHECK !!
This is used extensively with LINQ statements
This enables the user of local type inference when declaring variables.
When this is On, you can declare local variables without explicitly stating their datatype.
New to VB in Visual Studio 2008
The default is on.
If you have Option Explicit switched off then whether a variable has the old behaviour or new is determined by this setting ???
Turning Option Infer On allows old VB6 code full of variants to compile and run.
To set Option Infer in a file type type Option Infer On at the top of the file, before any source code
If this value conflicts with the setting in the IDE then the value in the file has precedence.
The compiler infers the datatype for a variable when it is initialised.
Right click on your project and select "Properties"
Display the Compile tab
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext