Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

C# equivalent to VB expression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny Jörgensen - 27 Mar 2008 10:57 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?

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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.