.NET ex.Message vs ex.ToString?

Exception.Message contains only the message (doh) associated with the exception. Example:

Object reference not set to an instance of an object

The Exception.ToString() method will give a much more verbose output, containing the exception type, the message (from before), a stack trace, and all of these things again for nested/inner exceptions.

Reference:http://stackoverflow.com/questions/2176707/net-ex-message-vs-ex-tostring

Leave a comment