Anyone have a good way to output an Exception in C# to a string that handles inner exceptions and the such? I am sure every developer has her own implimentation of this, but I can’t find my old one and want to see what better ones are out there.
Here is one without recursion for inner exceptions as an example:
var Message = String.Format("Exception Message: \n{0}\n\nStackTrace: \n{1}", ex.Message, ex.StackTrace);
Simply method ToString is the best: