Snipps by Patrik

Get Class Methods Using Reflection

You can use the following code snippets to get a class's public methods using reflection. The class name is provided as typeName.

MethodInfo[] methodInfos = typeof(Class).GetMethods();

Variant with filter using BindingFlags

MethodInfo[] methodInfos = Type.GetType(typeName) 
                           .GetMethods(BindingFlags.Public | BindingFlags.Instance);

Comments