-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option strict on source level #206
Comments
Your example has a simple workaround just cast 123 but this would be useful because as I have reported in #23367 (repeated below) sometime valid code will not compile depending on state of Option Strict and Option Infer and there is no easy workaround that don't change the original code..
|
@paul1956 |
@tverweij I agree it would be very useful, I always use Strict On and Infer Off and continue to run into issues on one line in a file where this would help. My workaround today is to flip the Options get rid of all the errors I can (using codefix) and then flipping the Options back and hoping no one ever touches the file again. |
Closed - duplicate of 117 |
In VB.Net, we have option Strict on project level and on file level.
It should be nice to have it on source level too:
Option Strict On
Public Class x
Private f as string = "123"
#Option Strict OFF
Private f2 as string = 123 'this will compile
#Option Strict ON
Private f3 as string = 123 'this won't compile
The text was updated successfully, but these errors were encountered: