Visual Basic .NET Language Option Strict

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • Option Strict { On | Off }

Remarks

Option Strict On is a recommended good practice with Visual Basic .Net. It helps you as the developer to produce cleaner, more stable, more bug-free, more maintainable code. In some cases it may also help you write programs with better performance, avoiding things such as Implicit Conversion.

On is not the default setting for a new installation of Visual Studio. It should be one of the first things changed before beginning programming if you are going to use VB.NET. The reason it is not the default setting comes from the first editions of Visual Studio when programmers were expected to be migrating projects from VB6.



Got any Visual Basic .NET Language Question?