다음을 통해 공유


Module.FilterTypeNameIgnoreCase 필드

이름을 기반으로 이 모듈에 정의된 형식 목록을 필터링하는 TypeFilter 개체입니다. 이 필드는 대/소문자가 구분되지 않으며 읽기 전용입니다.

네임스페이스: System.Reflection
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Shared ReadOnly FilterTypeNameIgnoreCase As TypeFilter
‘사용 방법
Dim value As TypeFilter

value = Module.FilterTypeNameIgnoreCase
public static readonly TypeFilter FilterTypeNameIgnoreCase
public:
static initonly TypeFilter^ FilterTypeNameIgnoreCase
public static final TypeFilter FilterTypeNameIgnoreCase
public static final var FilterTypeNameIgnoreCase : TypeFilter

설명

이 필터의 끝 부분에 "*" 와일드카드를 사용할 수 있습니다.

예제

다음 예제에서는 대/소문자를 구분하지 않고 지정된 검색 조건과 일치하는 모듈 이름을 표시합니다.

Imports System
Imports System.Reflection

Namespace ReflectionModule_Examples
    Class MyMainClass
        Shared Sub Main()
            Dim moduleArray() As [Module]

            moduleArray = [Assembly].GetExecutingAssembly().GetModules(False)

            'In a simple project with only one module, the module at index
            ' 0 will be the module containing these classes.
            Dim myModule As [Module] = moduleArray(0)

            Dim tArray() As Type

            tArray = myModule.FindTypes([Module].FilterTypeNameIgnoreCase, "my*")

            Dim t As Type
            For Each t In tArray
                Console.WriteLine("Found a module beginning with my*: {0}", t.Name)
            Next t
        End Sub 'Main
    End Class 'MyMainClass

    Class MySecondClass
    End Class 'MySecondClass

    'This class does not fit the filter criteria my*
    Class YourClass
    End Class 'YourClass
End Namespace 'ReflectionModule_Examples
using System;
using System.Reflection;

namespace ReflectionModule_Examples
{
    class MyMainClass
    {
        static void Main()
        {
            Module[] moduleArray;
            
            moduleArray = Assembly.GetExecutingAssembly().GetModules(false);
            
            // In a simple project with only one module, the module at index
            // 0 will be the module containing these classes.
            Module myModule = moduleArray[0];

            Type[] tArray;

            tArray = myModule.FindTypes(Module.FilterTypeNameIgnoreCase, "my*");
            
            foreach(Type t in tArray)
            {
                Console.WriteLine("Found a module beginning with my*: {0}", t.Name);
            }
        }
    }

    class MySecondClass
    {
    }

    // This class does not fit the filter criteria my*.
    class YourClass
    {
    }
}
using namespace System;
using namespace System::Reflection;
using namespace System::Collections;
public ref class MyMainClass{};

public ref class MySecondClass{};


// This class does not fit the filter criteria my*.
public ref class YourClass{};

int main()
{
   array<Module^>^moduleArray;
   moduleArray = Assembly::GetExecutingAssembly()->GetModules( false );
   
   // In a simple project with only one module, the module at index
   // 0 will be the module containing these classes.
   Module^ myModule = moduleArray[ 0 ];
   array<Type^>^tArray;
   tArray = myModule->FindTypes( Module::FilterTypeNameIgnoreCase, "my*" );
   IEnumerator^ myEnum = tArray->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Type^ t = safe_cast<Type^>(myEnum->Current);
      Console::WriteLine( "Found a module beginning with my*: {0}", t->Name );
   }
}
package ReflectionModule_Examples;

import System.*;
import System.Reflection.*;

class MyMainClass
{

    public static void main(String[] args)
    {
        Module moduleArray[];
        moduleArray = Assembly.GetExecutingAssembly().GetModules(false);

        // In a simple project with only one module, the module at index
        // 0 will be the module containing these classes.
        Module myModule = (Module)moduleArray.get_Item(0);
        Type tArray[];
        tArray = myModule.FindTypes(Module.FilterTypeNameIgnoreCase, "my*");
        for (int iCtr = 0; iCtr < tArray.length; iCtr++) {
            Type t = tArray[iCtr];
            Console.WriteLine("Found a module beginning with my*: {0}",
                t.get_Name());
        }
    } //main
} //MyMainClass

class MySecondClass
{
} //MySecondClass

// This class does not fit the filter criteria my*.
class YourClass
{
} //YourClass   

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

Module 클래스
Module 멤버
System.Reflection 네임스페이스
FindTypes