using System;
public class Program
{
public static void Main()
try {
A();
} catch (Exception e) {
Console.WriteLine("throw");
Console.WriteLine(e.StackTrace);
}
Console.WriteLine();
A(throwEx: true);
Console.WriteLine("throw ex");
private static void A(bool throwEx = false)
B();
} catch (Exception ex) {
if (throwEx) {
throw ex;
} else {
throw;
private static void B()
C();
private static void C()
throw new Exception("Blah");