Is there a C# equivalent method to Java’s Exception.printStackTrace() or do I have to write something myself, working my way through the InnerExceptions?
Is there a C# equivalent method to Java’s Exception.printStackTrace() or do I have to
Share
Try this:
From http://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx:
Note that in the above code the call to
ToStringisn’t required as there’s an overload that takesSystem.Objectand callsToStringdirectly.