The CStr conversion happens whether you have Option Strict on or not.
So no there isn't any overhead.
The main difference is that with Option Strict On you are forced to do such
conversions explicity instead of relying on VB to do them automatically for
you.
While this requires a bit of extra work, it is considered to be well worth
it to help prevent unexpected runtime errors.
These kinds of bugs can be notoriously difficult to flush out and can be
very expensive to fix if they are discovered after an app is deployed. This
is why most good developers will tell you to always turn Option Strict on.
--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Showjumper" <sh*******@grkjashdjkf.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
By turning Option Strict on, is there extra overhead? For example w/o it
on the following doesnt get flagged:
validxhtml.Attributes.Add("height", 22) but with it on the 22 is
underlined and the message is "Option Strict On disallows implicit conversions from
'Integer' to 'String'.". I then use validxhtml.Attributes.Add("height",
cstr(22)) and the blue squiggel goes away with strict on. By using cstr is
there extra overhead created?