SimpleLogger.SimpleLog.GetExceptionAsXmlString C# (CSharp) Method

GetExceptionAsXmlString() public static method

Gets an XML string with detailed information about an exception
Recursively adds elements for inner exceptions. For the most inner exception, the stack trace is added. Tags for Exception.Data are added. Specific properties of the exception types SqlException, COMException and AggregateException are recognized, too.
public static GetExceptionAsXmlString ( Exception ex ) : string
ex System.Exception The exception to get detailed information about
return string
        public static string GetExceptionAsXmlString(Exception ex)
        {
            XElement xElement = GetExceptionXElement(ex);
            return xElement == null ? string.Empty : xElement.ToString();
        }