471,888 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,888 software developers and data experts.

C# equivalent to VB expression

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.
Mar 27 '08 #1
3 4384
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
Mar 27 '08 #2
"Johnny Jörgensen" <jo**@altcom.sewrote in message
news:ON**************@TK2MSFTNGP03.phx.gbl...
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.
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.
Mar 27 '08 #3
There is no C# equivalent to VB's legacy Err object (used in unstructured
error handling).
--
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
"Johnny Jörgensen" wrote:
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.
Mar 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Dark Cowherd | last post: by
11 posts views Thread by Kobu | last post: by
8 posts views Thread by Xucyr | last post: by
14 posts views Thread by grid | last post: by
11 posts views Thread by Philipp Brune | last post: by
6 posts views Thread by Jon Paal | last post: by
4 posts views Thread by rick | last post: by
46 posts views Thread by lovecreatesbea... | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.