Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I think the performance hit is only when you actually throw an error. I wouldn't see why catching one would cause any slow down.. Unless of course you're comparing On Error GoTo to Try.. Catch, in which case that'd be interesting to see benchmarks on.
Gamer extraordinaire. Programmer wannabe.
  • Moderators
Posted

For sure when you Throw, you are taxing your system.

 

I ment for the occasions when all goes well and there are no exceptions, it's just because I use it a great deal, that's all.

Visit...Bassic Software
  • Moderators
Posted

Oh, and On Error has left my vocabulary.

and On Error Resume Next I almost never used in VB6.

 

btw wyrd, for the short amount of time you've been in VB6/.NET,

I find that you're quite advanced. Good job.

Visit...Bassic Software
Posted

btw wyrd, for the short amount of time you've been in VB6/.NET,

I find that you're quite advanced. Good job.

 

Thanks. :D

 

Heck, since you brought it up.. how long have all of you been working with .NET for? Only about a month for me.

Gamer extraordinaire. Programmer wannabe.
  • *Experts*
Posted

About a month for me too. It's surprisingly easy to pick up. Took me

about 25 minutes to grasp the basic concepts. My first program

scanned directories and subdirectories and made thumbnail images

of any GIF images it found. :)

Posted
I've seen jobs posted which ask for 2 years professional C# experience

 

:eek:

 

My first program scanned directories and subdirectories and made thumbnail images of any GIF images it found.

 

Very cool. :)

Gamer extraordinaire. Programmer wannabe.
  • *Gurus*
Posted
...

Option Strict: Absolutely. Turn it on, no excuses.

...

While I agree with this statement, I wonder about all the

examples I have seen (even in professional books) using late

binding (which Option Strict will refuse to compile). Also, many

examples don't even seem to be consistantly using explicit casts.

Has anyone here who normally uses it found they had to turn it

off to accomplish something unusual?

  • Moderators
Posted
Has anyone here who normally uses it found they had to turn it

off to accomplish something unusual?

 

I always use Option Strict On, the one time I did not was for this;

 

I had a dozen RadioButtons, and I wanted to get the Tag value of the clicked item, so I added all of the handles into one click event and did this....

 

x = sender.Tag

 

BTW, I started .NET 7 months ago, and last week I finished a 3 month contract using it.

Visit...Bassic Software
  • *Gurus*
Posted

Thinker: I've done a great deal of different projects with vb.net and never needed to turn Option Strict off. That's not to say I haven't discovered the need to yet :)

 

Robby:

 

DirectCast(DirectCast(sender, RadioButton).Tag, String)

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 2 weeks later...
  • *Experts*
Posted

What about creating instances of classes that you create dynamically

using the CodeDom? Wouldn't you have to declare an Object

variable, and then use the Assembly.CreateInstance method to

initialize it? Wouldn't that be considered late-binding, and therefore,

not supported by Option Strict?

  • *Gurus*
Posted

You are correct. However, I can see no useful application for this. You could walk the methods of the class using reflection and execute them without late binding if you had to.

 

In practice if you were compiling class libraries on the fly, you would know a type or interface they would adhere to.

 

Remember, C# can do virtually everything VB.NET can do and it doesn't support late binding, period.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...