"John" <in**@nospam.infovis.co.ukwrote in message
news:OK**************@TK2MSFTNGP04.phx.gbl...
Hi
I have several statements in my try block. After catching an exception and
dealing with it in catch section, is there a way to resume from next
statement in try section kinda like resume next in vb?
If you want Resume Next then either use the solution Jay showed of using
GoTo from inside the Catch, or you can in fact use On Error Resume Next as
per Visual Basic 6 style of coding and the compiler does that GoTo and
labels for you, but you cannot mix and match that. Personally, I'd do
neither, instead I'd look at refactorign the code out that can cause errors
that you wish to still resume next from, and change that into logical
checking, such as checking for a condition, or a null returned from a method
etc, and also consider multiple small Try Catch blocks.