469,270 Members | 1,011 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

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 4323
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.