Ask a Question related to ASP.NET General, Design and Development.
-
Showjumper #1
Does Option Strict On add overhead?
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?
Showjumper Guest
-
Zoom effect on a overhead map
As part of a prototype for a mobile city guide I am trying to implement a zoom in map, whereby portions of a map can be selected and zoomed in on. ... -
Option Strict On disallows late binding
I always get the late binding error with the following method. Is there anyway around this without turning Option Strict Off? Private Sub... -
Overhead of objects
I'm wondering what the overhead is when creating objects, the project I'm currently working on would require many object creations, and I need to... -
Imports ANYnamespace.anyClass (overhead??)
Importing a namespace, is simply shorthand, so you don't have to type the fully qualified name of the class every time. I believe it is only used at... -
Include Files and Overhead
I have a medium sized ecommerce website which I have written using PHP and MySQL and I have a number of include files with some of them being... -
Steve C. Orr, MCSD #2
Re: Does Option Strict On add overhead?
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
[url]http://Steve.Orr.net[/url]
"Showjumper" <shojumper@grkjashdjkf.com> wrote in message
news:%23XbW4exVDHA.2004@TK2MSFTNGP10.phx.gbl...on> By turning Option Strict on, is there extra overhead? For example w/o itunderlined> the following doesnt get flagged:
> validxhtml.Attributes.Add("height", 22) but with it on the 22 is> 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?
>
>
Steve C. Orr, MCSD Guest
-
John Saunders #3
Re: Does Option Strict On add overhead?
Option Strict On causes no overhead.
In fact, it reduces the overhead caused by developers wondering why their
code didn't work, since it compiled ok.
In your example, why not use:
validxhtml.Attributes.Add("height", "22")
--
John Saunders
Internet Engineer
[email]john.saunders@surfcontrol.com[/email]
"Showjumper" <shojumper@grkjashdjkf.com> wrote in message
news:%23XbW4exVDHA.2004@TK2MSFTNGP10.phx.gbl...on> By turning Option Strict on, is there extra overhead? For example w/o itunderlined> the following doesnt get flagged:
> validxhtml.Attributes.Add("height", 22) but with it on the 22 is> 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?
>
>
John Saunders Guest



Reply With Quote

