Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




How to read a method with reflection

				
Assembly asm = Assembly.LoadFrom("C:\\Test.dll");
Type t = asm.GetType("clsAmit");
MethodInfo mi = t.GetMethod("Function1", new Type[] { typeof(Object[]) });
Object ob = Activator.CreateInstance(t);
mi.Invoke(ob, new Object[] { "param1", "param2" });

Share this article   |    Print    |    Article read by 2194 times
Author:
Guest
Guest user is that user who have done some activity on website without login. Activity contains commenting on any article, uploading an image on website etc.
Related Articles: No related article
Related Interview Questions: