473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 4435
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Dodier | last post by:
Hello, Here's a thought that I'm sure has already occurred to someone else, I just can't find any record of it yet. An XML document is just a more verbose and clumsy representation of an...
11
by: Dark Cowherd | last post by:
http://www.ucalc.com/mathparser/index.html There is a great library called UCALC which allows you to set up an expression and evaluate it for e.g. you an define an expression by calling a...
11
by: Kobu | last post by:
Hi, I've gotten into the habit of mentally converting big expressions to parse tress (started doing this after reading some c.l.c posts on parse trees). Can someone verify if the following...
8
by: Xucyr | last post by:
I can't find any "short" code to make this work without taking 100s of lines (because I have to keep repeating this process several times). But this is what I have so far: int i = 7; do {...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
14
by: ThunderMusic | last post by:
Hi, The subject says it all. Is there an equivalent, in VB.NET, for the C# statement Lock(Object){} Thanks ThunderMusic
11
by: Philipp Brune | last post by:
Hello Newsgroup, in c# there exists the '??' operator. It is used like this : string s1 = null; string s2 = s1 ?? "(undefined)" And does the following (simplified) :
6
by: Jon Paal | last post by:
what is vb equiv. of ++ shown in C# ?
4
by: rick | last post by:
hi Is there a DB2 equivalent of Informix.Extend function? or please help me the best way to create one Thanks rick
46
by: lovecreatesbea... | last post by:
Do you prefer malloc or calloc? p = malloc(size); Which of the following two is right to get same storage same as the above call? p = calloc(1, size); p = calloc(size, 1);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.