If it loads the assembly, it sounds like you just want to do it once, in which case a static constructor might be worthwhile:
public class Foo { static Foo() {
Note that if this fails (throws an exception), the type will be unusable in AppDomain .
Is there a reason why you are not just using regular type permission to load an assembly? Will the assembly load automatically when you need to use it? Could you give more detailed information about the problem you are trying to solve?
source share