using System;
using System.Reflection;
using System.Security;
public class MyFilterAttributeSample
{
public static void Main()
{
MemberFilter myFilter = Type.FilterAttribute;
Type myType = typeof(System.String);
MemberInfo[] myMemberInfoArray = myType.FindMembers(MemberTypes.Constructor
|MemberTypes.Method, BindingFlags.Public | BindingFlags.Static |
BindingFlags.Instance, myFilter, MethodAttributes.SpecialName);
foreach (MemberInfo myMemberinfo in myMemberInfoArray)
{
Console.Write ("\n" + myMemberinfo.Name);
Console.Write (" is a " + myMemberinfo.MemberType.ToString());
}
}
}