The code below goes through all the methods in the given dll. I'm wondering
how I can modify this to only get methods with a specific custom attribute.
I'm not seeing any Custom Attributes like [TestMethod()] when I print out the
attributes.
Thanks,
Randy
Assembly a = Assembly.LoadFile(s);
Type[] types = a.GetTypes();
foreach (Type t in types)
{
MethodInfo[] methods = t.GetMethods();
foreach (MethodInfo m in methods)
{
MethodAttributes ma = m.Attributes;
Console.WriteLine(ma.ToString());
}
}