TypeDescriptor.GetComponentName 메서드

정의

지정된 구성 요소의 이름을 반환합니다.

오버로드

GetComponentName(Object)

기본 형식 설명자를 사용하여 지정된 구성 요소의 이름을 반환합니다.

GetComponentName(Object, Boolean)

사용자 지정 형식 설명자를 사용하여 지정된 구성 요소의 이름을 반환합니다.

GetComponentName(Object)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

기본 형식 설명자를 사용하여 지정된 구성 요소의 이름을 반환합니다.

public:
 static System::String ^ GetComponentName(System::Object ^ component);
public static string GetComponentName (object component);
public static string? GetComponentName (object component);
static member GetComponentName : obj -> string
Public Shared Function GetComponentName (component As Object) As String

매개 변수

component
Object

클래스 이름을 지정할 Object 입니다.

반환

지정된 구성 요소의 이름을 포함하는 String 이거나, 구성 요소 이름이 없는 경우 null 입니다.

예외

component이(가) null인 경우

component 는 크로스 프로세스 원격 개체입니다.

설명

일반적으로 이 메서드는 구성 요소의 사이트에 대한 이름을 반환합니다(있는 경우). 예를 들어 단추의 클래스 이름은 "System.Windows입니다. Forms. Button"을 선택합니다.

이 메서드는 의 두 번째 매개 변수false를 사용하여 오버로드된 GetComponentName(Object, Boolean) 메서드와 동일합니다.

이 메서드는 디자인 타임에 구성 요소의 instance 이름을 검색하는 데 사용됩니다.

추가 정보

적용 대상

GetComponentName(Object, Boolean)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

사용자 지정 형식 설명자를 사용하여 지정된 구성 요소의 이름을 반환합니다.

public:
 static System::String ^ GetComponentName(System::Object ^ component, bool noCustomTypeDesc);
public static string GetComponentName (object component, bool noCustomTypeDesc);
public static string? GetComponentName (object component, bool noCustomTypeDesc);
static member GetComponentName : obj * bool -> string
Public Shared Function GetComponentName (component As Object, noCustomTypeDesc As Boolean) As String

매개 변수

component
Object

클래스 이름을 지정할 Object 입니다.

noCustomTypeDesc
Boolean

사용자 지정 형식 설명 정보를 고려하지 않으려면true 이고, 고려하려면 false입니다.

반환

지정된 구성 요소의 이름이거나, 구성 요소 이름이 없는 경우 null 입니다.

예외

component이(가) null인 경우

component 는 크로스 프로세스 원격 개체입니다.

설명

이 메서드는 디자인 타임에 구성 요소의 instance 이름을 검색하는 데 사용됩니다. 일반적으로 이 메서드는 구성 요소의 사이트에 대한 이름을 반환합니다(있는 경우). 예를 들어 단추의 클래스 이름은 "System.Windows입니다. Forms. Button"을 선택합니다. 구성 요소가 인터페이스를 구현하는 ICustomTypeDescriptor 경우 대체 이름을 반환할 수 있습니다.

추가 정보

적용 대상