I experimented with FailFast and found that:
(1) It ignores the "Message" parameter that I send to it
(2) The only functionality it appears to acieve is to show a message:
"blah.exe has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something the information you were working on might be lost"
Errm, what is the value that this Environment.FailFast is supposed to be adding ?
TIA
Bill
what is the value that this Environment.FailFast is supposed to be adding when I can just use Environment.Exit(); ?
System.Environment.FailFast offers the user a chance to send an error report, then terminates the process. (It's the nicer managed equivalent to calling ExitProcess when you decide you really can't go on.) If you're writing a class library you probably don't want to use FailFast--at least not if you like having customers :-D. If you're writing an application, though, it often makes sense if you really want the process to die. Exceptions can be caught; FailFast just kills the process right away.
Environment When the above line executes a fancy message box is shown with two buttons - Debug and Close. The message on the message box is what I wrote above and I cannot see "Asta La Vista Baby" anywhere on the message box. Are you saying that you see a "send" button on your version? I would be interested to know where it is being sent ? Back to Redmond ? If there is Send functionality then I can see the usefulness of FailFast, but if there is no send button I would just use Environment.Exit ?