_Type.GetConstructor 메서드

정의

버전에 관계없이 GetConstructor 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

오버로드

GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

버전에 관계없이 GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])

버전에 관계없이 GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

GetConstructor(Type[])

버전에 관계없이 GetConstructor(Type[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

설명

이 메서드는 비관리 코드에서 액세스를 위한 관리 되는 클래스에는 하며 관리 코드에서 호출할 수 없습니다.

합니다 Type.GetConstructor 메서드는 현재 특정 생성자를 가져옵니다 Type합니다.

GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

버전에 관계없이 GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

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

매개 변수

bindingAttr
BindingFlags

검색 방법을 지정하는 하나 이상의 BindingFlags로 구성된 비트 마스크입니다.

또는

0(null을 반환하는 경우)

binder
Binder

속성 집합을 정의하고 바인딩을 활성화하는 Binder 개체입니다. 이 개체는 또한 리플렉션을 통해 오버로드된 멤버를 선택할 수 있고 인수 형식을 강제 변환할 수 있으며 멤버를 호출할 수도 있습니다.

또는

DefaultBinder를 사용하려는 경우 null입니다.

callConvention
CallingConventions

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

types
Type[]

가져올 생성자에 대한 매개 변수의 수, 차수, 형식 등을 나타내는 Type 개체 배열입니다.

또는

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

modifiers
ParameterModifier[]

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

반환

지정된 요구 사항과 일치하는 생성자를 나타내는 ConstructorInfo 개체가 있으면 이 개체를 반환하고, 그렇지 않으면 null을 반환합니다.

설명

이 메서드는 비관리 코드에서 액세스를 위한 관리 되는 클래스에는 하며 관리 코드에서 호출할 수 없습니다.

Type.GetConstructor 메서드는 지정 된 인수 형식 및 한정자를 지정 된 바인딩 제약 조건 및 호출 규칙을 사용 하 여 일치 하는 매개 변수를 가진 생성자를 검색 합니다.

적용 대상

GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])

버전에 관계없이 GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

public:
 System::Reflection::ConstructorInfo ^ GetConstructor(System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.ConstructorInfo GetConstructor (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetConstructor : System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.ConstructorInfo
Public Function GetConstructor (bindingAttr As BindingFlags, binder As Binder, types As Type(), modifiers As ParameterModifier()) As ConstructorInfo

매개 변수

bindingAttr
BindingFlags

검색 방법을 지정하는 하나 이상의 BindingFlags로 구성된 비트 마스크입니다.

또는

0(null을 반환하는 경우)

binder
Binder

속성 집합을 정의하고 바인딩을 활성화하는 Binder 개체입니다. 이 개체는 또한 리플렉션을 통해 오버로드된 멤버를 선택할 수 있고 인수 형식을 강제 변환할 수 있으며 멤버를 호출할 수도 있습니다.

또는

DefaultBinder를 사용하려는 경우 null입니다.

types
Type[]

가져올 생성자에 대한 매개 변수의 수, 차수, 형식 등을 나타내는 Type 개체 배열입니다.

또는

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

또는

EmptyTypes.

modifiers
ParameterModifier[]

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

반환

지정된 요구 사항과 일치하는 생성자를 나타내는 ConstructorInfo 개체가 있으면 이 개체를 반환하고, 그렇지 않으면 null을 반환합니다.

설명

이 메서드는 비관리 코드에서 액세스를 위한 관리 되는 클래스에는 하며 관리 코드에서 호출할 수 없습니다.

Type.GetConstructor 메서드 매개 변수를 가진 지정 된 인수 형식 및 한정자를 지정 된 바인딩 제약 조건과 일치 하는 생성자를 검색 합니다.

적용 대상

GetConstructor(Type[])

버전에 관계없이 GetConstructor(Type[]) 메서드에 액세스할 수 있는 COM 개체를 제공합니다.

public:
 System::Reflection::ConstructorInfo ^ GetConstructor(cli::array <Type ^> ^ types);
public System.Reflection.ConstructorInfo GetConstructor (Type[] types);
abstract member GetConstructor : Type[] -> System.Reflection.ConstructorInfo
Public Function GetConstructor (types As Type()) As ConstructorInfo

매개 변수

types
Type[]

원하는 생성자에 대한 매개 변수의 수, 순서 및 형식을 나타내는 Type 개체의 배열입니다.

또는

매개 변수를 사용하지 않는 생성자를 가져오기 위한 Type 개체의 빈 배열입니다. 이러한 빈 배열은 static 필드 EmptyTypes에서 제공됩니다.

반환

매개 변수 형식 배열의 형식과 일치하는 매개 변수를 가진 public 인스턴스 생성자를 나타내는 ConstructorInfo 개체가 있으면 그 개체를 반환하고, 그렇지 않으면 null을 반환합니다.

설명

이 메서드는 비관리 코드에서 액세스를 위한 관리 되는 클래스에는 하며 관리 코드에서 호출할 수 없습니다.

Type.GetConstructor 메서드는 지정된 된 배열의 형식과 일치 하는 매개 변수를 가진 public 인스턴스 생성자를 검색 합니다.

적용 대상