Can anybody tell me what the C# equivalent to VB's
Err.Clear()
is? As far as I can see, the Err object only exists in VB. But how do you
clear the error collection in C# then?
Cheers,
Johnny J.
Jon Skeet [C# MVP] - 27 Mar 2008 11:06 GMT
> Can anybody tell me what the C# equivalent to VB's
>
> Err.Clear()
>
> is? As far as I can see, the Err object only exists in VB. But how do you
> clear the error collection in C# then?
What error collection are you talking about? What are you trying to
achieve, at a higher level? How is your code behaving, and how do you
want it to behave?

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Marc Gravell - 27 Mar 2008 11:07 GMT
There isn't one to clear... if you catch an exception and don't want to
rethrow it, then just don't rethrow it. Or throw something else.
Marc
Michael D. Ober - 27 Mar 2008 12:59 GMT
> Can anybody tell me what the C# equivalent to VB's
>
[quoted text clipped - 5 lines]
> Cheers,
> Johnny J.
The Err object doesn't exist in C#. This is a holdover from VB6 and
earlier, and although it appears in VB 2005/2008, you need to replace the
entire error handler with a try {...} catch (Exception e) {...} Finally
{...} block.
Mike.
David Anton - 27 Mar 2008 15:23 GMT
There is no C# equivalent to VB's legacy Err object (used in unstructured
error handling).

Signature
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
Java to C#
Java to VB
Instant C#: convert VB to C#
Instant VB: convert C# to VB
Instant C++: VB, C#, or Java to C++/CLI
> Can anybody tell me what the C# equivalent to VB's
>
[quoted text clipped - 5 lines]
> Cheers,
> Johnny J.