Getting exception that caused program to crash without being in debug mode
<p>I have an application in C# that I want to run by just running the .exe from my desktop.  However,  I'm pretty sure there will be some type of error that will make the program crash.  Is there a way to write the problem that caused the program to crash to a text file, so that I can see what caused the issue when users are using the program?  I know I can use debug mode to do this but I want to run the application as a stand alone not inside of VS.</p>

<p>Thanks,</p>

<p>I am aware of the try catch blocks and I am already using those where problems might occur.  But I am speaking in general.  For example if I wasn't sure where the problem would occur.  There is no way to print this specific error to a file.</p>
