I am compiling the c# code at run time using "Reflection" and trying to get the methods names. I am able to get the user defined methods and also predefined methods. But I want get the only the user defined methods.
My code :
Assembly assembly = results.CompiledAssembly;
var names = (from type in assembly.GetTypes()
from method in type.GetMethods(
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.Static)
select method.Name).Distinct().ToList();
Can any one help me.
Thanks in Advance.