For Answers, see/post comments

on error resume next in c# Options

Hi,
We have on error resume next option in vb language but we dont have that in c#.


I just want to do the same kind of functionality in c#.

Any help is really appreciated.

2 comments:

Anonymous said...

There is no direct equivalent in C#. Exception handling in C# is through try...catch...finally.

By placing appropriate code in your catch block you can probably approximate

what you want as once an exception is "caught", execution will resume at the statement(s) following the try...catch...finally block.

Anonymous said...

there is no equivalent
to On Error Resume Next. To simulate it, you'll have to enclose every
statement you want affected with a separate try/catch block where the catch
block is empty.
e.g.,
try
{
//statement 1

}


catch
{
//do nothing

}