EDN Admin
Well-known member
I get an exception The type initializer for Class threw an exception when calling a class through a separate application domain. If i call on the code directly without creating another appdomain then things run fine. This class have a few static members and methods.
Seems like all the public static properties of that class failed to initialize throwing System.TypeInitializationException. Any idea on whats going on here?
Thanks.
<p align=left>More example of the pseudo-code:
<p align=left>
<p align=left>Create new app domain
<p align=left>create instance of PUB class and unwrap (PUB inherits from ..MarshByRef..)
<p align=left>PUB.method() // call on the method from PUB class, now this will call on other objects to do work, and eventually one of the object threw exception The type initializer for Class threw an exception
View the full article
Seems like all the public static properties of that class failed to initialize throwing System.TypeInitializationException. Any idea on whats going on here?
Thanks.
<p align=left>More example of the pseudo-code:
<p align=left>
<p align=left>Create new app domain
<p align=left>create instance of PUB class and unwrap (PUB inherits from ..MarshByRef..)
<p align=left>PUB.method() // call on the method from PUB class, now this will call on other objects to do work, and eventually one of the object threw exception The type initializer for Class threw an exception
View the full article