Given an assembly that contains
namespace Foo{public class Bar;}
How could I create an Action<Foo.Bar> from another assembly without referencing the first assembly at compile time?
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.
If you use
actionTypewill now representAction<Foo.Bar>. However, to use it, you’ll need to contintue to use reflection, so you’ll need to find aMethodInfothat fits the signaturevoid(Foo.Bar), and callDelegate.CreateDelegateto create a delegate. And you’ll needDelegate.DynamicInvoketo execute it.Something tells me that’s not what you’re thinking of…