C ා imitate on error resume next in VB

C# mimics VB’s On Error Resume next
and adds a try catch. The exception is not handled in catch
Try
{
the for (int I = 0; i < 10; I++)
{
try
{
int p = 0;
int d = I/p;// is zero, will go wrong

} catch

attach MessageBox. Show (i.T oString ());// here say, will cycle through ten times

}}
the catch (Exception ex)
{
MessageBox. Show (ex. Message); // because the error divided by zero is caught by the inner try catch, the outer try catch will not catch the error divided by zero
}

Read More: