private static void KeepStackTrace() { Layer2 l2 = new Layer2(); try { l2.Layer2Method(); } catch (InvalidOperationException) { throw; } }
private static void ResetStackTrace() { Layer2 l2 = new Layer2(); try { l2.Layer2Method(); } catch (InvalidOperationException ex) { throw ex; //csak innentől kezdve marad meg a stacktrace-ben } }