I’m trying to add my plugins to my application via Assembly.LoadFrom and I would like to know if there’s a property to know what type of assembly was loaded – dynamically linked library and executables can be loaded, right?
Thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can determine whether the Assembly returned by the LoadFrom function has loaded an EXE or DLL using the Assembly.EntryPoint property. If the property returns a MethodInfo for the entry point function, then you are dealing with an EXE.
From MSDN:
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.entrypoint.aspx