Beispiel #1
0
        private static void KeepStackTrace()
        {
            Layer2 l2 = new Layer2();

            try
            {
                l2.Layer2Method();
            }
            catch (InvalidOperationException)
            {
                throw;
            }
        }
Beispiel #2
0
        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
            }
        }