How to retrieve the methods from a dll?
Can I retrieve them using the System.Reflection.Assembly? How?
Thanks!
Printable View
How to retrieve the methods from a dll?
Can I retrieve them using the System.Reflection.Assembly? How?
Thanks!
You could extend this thing using various methods of Type.Code:System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom("myassembly.dll");
Type[] types = assembly.GetExportedTypes();
foreach(Type type in types)
{
string typename;
if(type.IsClass)
typename = "class";
else if(type.IsValueType)
typename = "struct";
else if(type.IsEnum)
typename = "enum";
else
continue;
Console.WriteLine("Assembly defines a "+typename+" named "+type.FullName);
}
Or do you mean functions from a normal dll? Look up PInvoke in the reference.