Mega Code Archive

 
Categories / C# Tutorial / Language Basics
 

A Closer Look at Exception

Message property contains a string that describes the nature of the error. StackTrace property contains a string that contains the stack of calls that lead to the exception. TargetSite property obtains an object that specifies the method that generated the exception. System.Exception also defines several methods. ToString() returns a string that describes the exception. Exception defines four constructors. The most commonly used are shown here: Exception()   Exception(string str)