Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Option Strict on by default in VB.NET

Whenever I created a new VB.NET program I must go into the project's properties and set 'Option strict' on. Can I do that once so it is a default for every time I create a new project?

like image 537
pho Avatar asked Mar 01 '11 21:03

pho


People also ask

What is Option Strict On VB Net?

Option Strict prevents VB from making any implicit data type conversions that are narrowing since narrowing conversions may involve data loss.

What is Option Strict and Option Explicit in VB net?

The Explicit option indicates whether you will declare all variables. The Strict option indicates whether all variables will be of a specific type.


1 Answers

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.

like image 80
Rap Avatar answered Sep 19 '22 18:09

Rap