Why is UnhandledExceptionEventArgs.ExceptionObject an object and not an Exception?
问题 Why is UnhandledExceptionEventArgs.ExceptionObject an object and not an Exception ? I am attaching to AppDomain.UnhandledException . I would like to cast UnhandledExceptionEventArgs.ExceptionObject to an Exception and interogate it. And with this in mind will it ever be null? The MSDN documentation is not exatly useful. Gets the unhandled exception object. 回答1: This cannot be typed to Exception because it's possible to throw objects in .Net that do not derive from System.Exception. This is