Type.GetConstructorImpl 메서드

정의

파생 클래스에서 재정의되는 경우 지정된 바인딩 제약 조건 및 지정된 호출 규칙을 사용하여 매개 변수가 지정된 인수 형식 및 한정자와 일치하는 생성자를 검색합니다.

protected:
 abstract System::Reflection::ConstructorInfo ^ GetConstructorImpl(System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected abstract System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetConstructorImpl : System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.ConstructorInfo
Protected MustOverride Function GetConstructorImpl (bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As ConstructorInfo

매개 변수

bindingAttr
BindingFlags

검색을 수행하는 방법을 지정하는 열거형 값의 비트 조합입니다.

-또는-

Default 를 반환 null합니다.

binder
Binder

속성 집합을 정의하고 바인딩을 사용하도록 설정하는 개체로, 오버로드된 메서드 선택, 인수 형식 강제 변환 및 리플렉션을 통해 멤버 호출을 포함할 수 있습니다.

-또는-

Nothing 사용하는 null 참조(Visual Basic DefaultBinder)입니다.

callConvention
CallingConventions

인수의 순서 및 레이아웃, 반환 값 전달 방법, 인수에 사용되는 레지스터 및 스택 정리와 관련하여 사용할 규칙 집합을 지정하는 개체입니다.

types
Type[]

생성자가 가져올 매개 변수의 수, 순서 및 형식을 나타내는 개체의 배열 Type 입니다.

-또는-

매개 변수를 사용하지 않는 생성자를 가져오는 형식 Type 의 빈 배열(즉, Type[] types = new Type[0])입니다.

modifiers
ParameterModifier[]

배열의 ParameterModifier 해당 요소와 연결된 특성을 나타내는 개체의 types 배열입니다. 기본 바인더는 이 매개 변수를 처리하지 않습니다.

반품

ConstructorInfo 지정된 요구 사항과 일치하는 생성자를 나타내는 개체입니다(있는 경우). 그렇지 않으면 null.

예외

typesnull입니다.

-또는-

의 요소 types 중 하나는 .입니다 null.

types 가 다차원입니다.

-또는-

modifiers 가 다차원입니다.

-또는-

types 길이 modifiers 가 같지 않습니다.

설명

기본 바인더는 ParameterModifier를 처리하지 않지만 (modifiers 매개 변수) 추상 System.Reflection.Binder 클래스를 사용하여 modifiers를 처리하는 사용자 지정 바인더를 작성할 수 있습니다. ParameterModifier 는 COM interop을 통해 호출할 때만 사용되며 참조로 전달되는 매개 변수만 처리됩니다.

정확한 일치 항목이 없 binder 으면 일치 항목을 선택하기 위해 배열에 types 지정된 매개 변수 형식을 강제 변환하려고 시도합니다. 일치 binder 항목을 null 선택할 수 없는 경우 반환됩니다.

다음 BindingFlags 필터 플래그를 사용하여 검색에 포함할 생성자를 정의할 수 있습니다.

  • 반환을 얻으려면 BindingFlags.Instance 또는 BindingFlags.Static 중 하나를 지정해야 합니다.

  • 검색에 공용 생성자를 포함하도록 지정 BindingFlags.Public 합니다.

  • 비공용 생성자(즉, 프라이빗, 내부 및 보호된 생성자)를 검색에 포함하도록 지정 BindingFlags.NonPublic 합니다.

자세한 내용은 System.Reflection.BindingFlags을 참조하세요.

이 메서드는 GetConstructor를 구현합니다.

적용 대상

추가 정보