In a related question, my team is about to (hopefully) start using LINQ, and I'd like to take advantage of anonymous types. What is the best way to mix VB.NET's Option Strict (which we've been using through the life of the project) and the new Option Infer directives?
Option Strict and Option Infer do not conflict, so I see no harm in having both on.
As a style guide, I prefer to put Option Strict, Explicit, and Infer at the top of each class file - this prevents differences in project or IDE settings from causing issues, and makes it clear what settings are used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With