Hi guys,
I am using reflection to get methods in a .dll file but i want to get only user defined methods in the file. Here is what i do;
This code gets all methods in the assembly. Is there a way to get only user defined methods?
Thanks in advance
I am using reflection to get methods in a .dll file but i want to get only user defined methods in the file. Here is what i do;
Code:
Assembly assembly = Assembly.LoadFile(assemblyName);
Type[] types = assembly.GetTypes();
MethodInfo[] methods = null;
foreach(Type t in types)
{
if(t.Name == "MyClass")
{
methods = type.GetMethods();
}
}
Thanks in advance
Comment