Skip to content

Instantly share code, notes, and snippets.

@fpopic
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save fpopic/b8988ca87da9f12b0249 to your computer and use it in GitHub Desktop.

Select an option

Save fpopic/b8988ca87da9f12b0249 to your computer and use it in GitHub Desktop.
using System;
namespace k
{
class Program
{
static void Main()
{
int a = 0, b = 0;
int c;
try
{
try
{
Console.WriteLine("1");
c = a / b;
Console.WriteLine("2");
}
catch (DivideByZeroException)
{
c = b / a;
Console.WriteLine("3");
}
catch (Exception)
{
c = b / a;
Console.WriteLine("4");
}
finally
{
Console.WriteLine("5");
}
}
catch (Exception)
{
Console.WriteLine("6");
}
catch (DivideByZeroException)
{
c = b / a;
Console.WriteLine("7");
}
finally
{
Console.WriteLine("8");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment