Resuming execution of code after exception is thrown and caught
- by dotnetdev
Hi,
How is it possible to resume code execution after an exception is thrown?
For exampel, take the following code:
namespace ConsoleApplication1
{
class Test
{
public void s()
{
throw new NotSupportedException();
string @class = "" ;
Console.WriteLine(@class);
Console.ReadLine();
}
}
class Program
{
static void Main(string[] args)
{
try
{
new Test().s();
}
catch (ArgumentException x)
{
}
catch (Exception ex) { }
}
}
}
After catching the exception when stepping through, the program will stop running. How can I still carry on execution?
Thanks