Stuck with static constructor exception
It took me quite some time to understand why I was getting allways the same exception on a static constructor. So this blog confirmed what I suspected. The exception is cached and thrown again:
I found this with .NET2.0
I believe .NET 3.5 works differently since they added this to the documentation:
"If a static constructor throws an exception, the runtime will not invoke it a second time, and the type will remain uninitialized for the lifetime of the application domain in which your program is running"
0 Comments:
Enviar um comentário
<< Home