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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version