unhandled .NET exception

  • Thread starter Thread starter Ragid
  • Start date Start date
R

Ragid

I get in the run an unhandled .NET exception message box saying:"The
specified cast is not valid".
How can I know where is that error comes from?
Regards
Ragid
 
You should not handle this error, you should solve this error. It is simple
a code error not a runtime error.

Cor
 
I get in the run  an unhandled .NET exception message box saying:"The
specified cast is not valid".
How can I know where is that error comes from?

Run your program under the debugger (e.g. in VS). It should break at
the line which throws the exception, so long as your code doesn't
catch it (if you get the stock exception reporting dialog, then you
obviously don't).

You might also want to check settings in "Debug" -> "Exceptions", see
if you have the checkbox for "unhandled CLR Exceptions" on.
 
Back
Top