Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - VB6 Equivalent

Reply
 
Old 05-22-2008   #1 (permalink)
Phil Hunt


 
 

VB6 Equivalent

Is there a .NET #C equivalent of VB6 "On Error Resume Next".



My System SpecsSystem Spec
Old 05-22-2008   #2 (permalink)
sloan


 
 

Re: VB6 Equivalent


The #1 thing you can do with a VB6 mentality of exception handling in DotNet
is

1. Put it in a brown paper bag.
2. Take it to someone's house you don't like.
3. Set it on fire.
4. Run away from it as fast as you can.


...

I'm not trying to be mean, but rather FIRM about it.

Check here:
http://blogs.msdn.com/kcwalina/archi...16/396787.aspx


If you're using "resume next" in your VB.NET code, then stop doing it. Just
because you ~can~ doesn't mean you ~should~.

...

Good luck.







"Phil Hunt" <aaa@xxxxxx> wrote in message
news:%23KDvRzBvIHA.4772@xxxxxx
Quote:

> Is there a .NET #C equivalent of VB6 "On Error Resume Next".
>

My System SpecsSystem Spec
Old 05-22-2008   #3 (permalink)
Phil Hunt


 
 

Re: VB6 Equivalent

Well, there should be a way available to disable it no matter how good it
is.


"Tom Shelton" <tom_shelton@xxxxxx> wrote in message
news:%23zG6dyCvIHA.3500@xxxxxx
Quote:

> On 2008-05-22, sloan <sloan@xxxxxx> wrote:
Quote:

>>
>> The #1 thing you can do with a VB6 mentality of exception handling in
>> DotNet
>> is
>>
>> 1. Put it in a brown paper bag.
>> 2. Take it to someone's house you don't like.
>> 3. Set it on fire.
>> 4. Run away from it as fast as you can.
>>
>>
>> ..
>>
>
> LOL... So true.
>
> --
> Tom Shelton

My System SpecsSystem Spec
Old 05-22-2008   #4 (permalink)
sloan


 
 

Re: VB6 Equivalent

//quote
Well, there should be a way available to disable it no matter how good it
is.
//end quote


Huh?



"Phil Hunt" <aaa@xxxxxx> wrote in message
news:u1XSmODvIHA.3564@xxxxxx
Quote:

> Well, there should be a way available to disable it no matter how good it
> is.
>
>
> "Tom Shelton" <tom_shelton@xxxxxx> wrote in message
> news:%23zG6dyCvIHA.3500@xxxxxx
Quote:

>> On 2008-05-22, sloan <sloan@xxxxxx> wrote:
Quote:

>>>
>>> The #1 thing you can do with a VB6 mentality of exception handling in
>>> DotNet
>>> is
>>>
>>> 1. Put it in a brown paper bag.
>>> 2. Take it to someone's house you don't like.
>>> 3. Set it on fire.
>>> 4. Run away from it as fast as you can.
>>>
>>>
>>> ..
>>>
>>
>> LOL... So true.
>>
>> --
>> Tom Shelton
>
>

My System SpecsSystem Spec
Old 05-22-2008   #5 (permalink)
Jon Skeet [C# MVP]


 
 

Re: VB6 Equivalent

Phil Hunt <aaa@xxxxxx> wrote:
Quote:

> Well, there should be a way available to disable it no matter how good it
> is.
What, exception handling? No, not really. Exceptions are thrown for a
purpose. The closest you can come to ignoring them is to explicitly put
a try/catch block around each statement. This is really painful, for a
very good reason - if something goes wrong, you almost *never* just
want to ignore it and carry on with the very next statement.

--
Jon Skeet - <skeet@xxxxxx>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
My System SpecsSystem Spec
Old 05-22-2008   #6 (permalink)
Scott M.


 
 

Re: VB6 Equivalent

Agreed. I always thought of On Error Resume Next as "Close your eyes and
cover your ears and pretend everything is ok, when it isn't".


"Jon Skeet [C# MVP]" <skeet@xxxxxx> wrote in message
news:MPG.229fddb926440b82cd3@xxxxxx
Quote:

> Phil Hunt <aaa@xxxxxx> wrote:
Quote:

>> Well, there should be a way available to disable it no matter how good it
>> is.
>
> What, exception handling? No, not really. Exceptions are thrown for a
> purpose. The closest you can come to ignoring them is to explicitly put
> a try/catch block around each statement. This is really painful, for a
> very good reason - if something goes wrong, you almost *never* just
> want to ignore it and carry on with the very next statement.
>
> --
> Jon Skeet - <skeet@xxxxxx>
> Web site: http://www.pobox.com/~skeet
> Blog: http://www.msmvps.com/jon.skeet
> C# in Depth: http://csharpindepth.com

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
how to get pid, equivalent to $$ in unix PowerShell
Is there an equivalent to /dev/null PowerShell
Equivalent to $0? PowerShell
what is the equivalent of xp pro Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46