Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How can i do it?

In a Dll file ,there is a interface like "InterfaceA" ,I want to get something like this in my code by using reflection,
InterfaceA a;

Thanks
Posted
Updated 12-Dec-10 21:23pm
v2
Comments
Abdul Quader Mamun 13-Dec-10 3:23am    
Spelling check.
Toli Cuturicu 13-Dec-10 12:39pm    
Don't dare again place a fake answer!

1 solution

Thank you for your question. You can follow the bellow code.
C#
using System.Reflection;

C#
Assembly a = Assembly.LoadFrom("MyDll.dll");

Type type;
type = a.GetType().GetInterface("InterfaceA");
// type.Name;

More Information:http://msdn.microsoft.com/en-us/library/tcctb9t8.aspx[^]


Thanks,
Mamun
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900