C# Type FilterName
Description
Type FilterName
represents the case-sensitive member
filter used on names. This field is read-only.
Syntax
Type.FilterName
has the following syntax.
public static readonly MemberFilter FilterName
Example
The following code example gets the methods associated with the user-defined Application type.
using System.Reflection;
using System;// w w w . j a va 2 s .com
public class MainClass
{
public static void Main(String[] argv)
{
// Get the set of methods associated with the type
MemberInfo[] mi = typeof(String).FindMembers(MemberTypes.Constructor |
MemberTypes.Method,
BindingFlags.Public | BindingFlags.Static | BindingFlags.NonPublic |
BindingFlags.Instance | BindingFlags.DeclaredOnly,
Type.FilterName, "*");
Console.WriteLine("Number of methods (includes constructors): " + mi.Length);
}
}
The code above generates the following result.