Static Constructor and Exceptions
问题 What happen if a static constructor throws and exception and it is not handled? Will it remain till the application domain alive? 回答1: An unhandled exception in a static constructor, will be wrapped in a TypeInitializationException . If you're on .NET 2 or newer an unhandled exception will terminate the process. 回答2: The exception will propagate and if it is not caught somewhere like for example a global exception handler it will simply kill the application domain. 回答3: if an Exception