In ASP.NET,How can i know the Specific details about an exception (like What kind of Exception it is (FileNotFound /Arithmentc etc..) )from a General Exception class object
In ASP.NET,How can i know the Specific details about an exception (like What kind
Share
You can use
GetType()method to get the actual type of the exception instance.If you are interested in some property of a specific type of exception and you’re sure about the type, just cast the exception to the type and fetch the property value.
Alternatively, you can use reflection to interrogate the object and retrieve all of its properties.