using System;
using System.Runtime.ExceptionServices;
public class Program
{
public static void Main()
try
DoIt();
}
catch (Exception exception)
// zde můžeme něco udělat a pak...
// vyber variantu:
//throw exception;
//throw;
ExceptionDispatchInfo.Capture(exception).Throw();
private static void DoIt()
throw new ApplicationException();