[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

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

0
Micki-Weaver
Asked:
Micki-Weaver
1 Solution
 
Bob LearnedCommented:
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now