Answers inline
[quoted text, click to view] "Microsoft News" wrote:
> I have a project that was created all with Option Strict OFF. Works great,
> not a problem with it. But if I turn Option Strict ON then I get a LOT of
> errors.
>
> My question, should I even care about Option Strict?
Becaue you don't like sloppy code.
[quoted text, click to view] > What advantages do I get with Option Strict On?
The primary one is forcing explicit coding standards.
[quoted text, click to view] > Does better type statement make my code run faster?
NO. But, Option Strict can get rid of some really annoying logic errors
(syntax errors blow up, logic errors introduce bad data to application,
possibly even messing up your database).
OK, I will take that back. There are times when Option Strict can improve
performance, as well, by taking away certain VB.NET crutches.
[quoted text, click to view] > If anyone knows THE ANSWERS! please fill me in. I have ideas and belief but
> I would once and for all like to know what the difference is.
Overall, explicit coding is better, both for maintenance and ensuring your
code runs as expected. In 90% + of scenarios, turing Option Strict OFF is
fine. It is that small percent where it kills you. In most cases, bad
programming practice causes code to blow up when you turn Option Strict ON.
It is better to conquer those potential problems than leave them and turn it
back OFF. This is much like treating WARNINGS as ERRORS. While code works
fine when they are there, there is a small percentage of code that either
bombs, or worse, corrupts data when WARNINGS are left in. Best to erradicate
than take chances. Just my two cents.
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!