reflect a object to discover it's methods

C# or VB.net, how do I reflect a object to discover it's methods and data members

Micki-WeaverAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
Try this:

using System.Reflection;
using System.Collections.Generic;

...

    public static List<string> GetMethodInfo(Type type)
    {
        List<string> methodList = new List<string>();
        foreach (MethodInfo info in type.GetMethods())
        {
            methodList.Add(info.Name);
        }
        return methodList;
    }

Bob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.