using System; using System.Collections.Generic; using System.Text; namespace ThrowException { class Program { static void Main(string[] args) { try { try { GenerateException("rethrow"); } catch (ArgumentException) { throw; } } catch (Exception ex) { PrintStack(ex); } Console.WriteLine("\r\n********************\r\n"); try { try { GenerateException("rethrow ex"); } catch (ArgumentException ex) { throw ex; } } catch (Exception ex) { PrintStack(ex); } Console.ReadKey(); } static void GenerateException(String arg) { GoDeep(arg); } static void GoDeep(String arg) { throw new ArgumentException(arg); } static void PrintStack(Exception ex) { Console.WriteLine(ex.StackTrace); } } }