Search code examples
c#exceptionunhandled

Why two different results while handling the same Exception in C#?


I handled the same exception in two programs, but I got the different results. I don't know why.

the first result is the one the program unable to caught

Scapshot1:      www.freeimagehosting.net/uploads/e2b37433a3.png

and the second is the one the program succeed to caught

Scapshot2:      www.freeimagehosting.net/uploads/6ab7564999.png

Why I got such a different?


Solution

  • Well, you haven't really provided much context. Things to check:

    • Are they the same type of application (WPF, WinForms, Silverlight, Console etc)?
    • Are they using the same version of .NET?
    • Are they running on the same version of Windows?
    • Do they have the same code for reacting to unhandled exceptions?