TypeDescriptor.GetComponentName Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen bileşenin adını döndürür.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| GetComponentName(Object) |
Varsayılan tür tanımlayıcısını kullanarak belirtilen bileşenin adını döndürür. |
| GetComponentName(Object, Boolean) |
Özel bir tür tanımlayıcısı kullanarak belirtilen bileşenin adını döndürür. |
GetComponentName(Object)
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
Varsayılan tür tanımlayıcısını kullanarak belirtilen bileşenin adını döndürür.
public:
static System::String ^ GetComponentName(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static string? GetComponentName(object component);
public static string GetComponentName(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetComponentName : obj -> string
static member GetComponentName : obj -> string
Public Shared Function GetComponentName (component As Object) As String
Parametreler
Döndürülenler
String Belirtilen bileşenin adını içeren veya null bileşen adı yoksa.
- Öznitelikler
Özel durumlar
component, null'e eşittir.
component , işlemler arası uzak bir nesnedir.
Açıklamalar
Genellikle, bu yöntem varsa bileşenin sitesinin adını döndürür. Örneğin, bir düğmenin sınıf adı "Sistem. Windows. Forms.Button".
Bu yöntem, ikinci parametresi olan aşırı yüklenmiş GetComponentName(Object, Boolean) yönteme eşdeğerdir false.
Bu yöntem, bir bileşenin örneğinin adını almak için tasarım zamanında kullanılır.
Ayrıca bkz.
- GetComponentName()
- GetClassName
- GetFullComponentName(Object)
- CreateInstance(IServiceProvider, Type, Type[], Object[])
- GetReflectionType
Şunlara uygulanır
GetComponentName(Object, Boolean)
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
- Kaynak:
- TypeDescriptor.cs
Özel bir tür tanımlayıcısı kullanarak belirtilen bileşenin adını döndürür.
public:
static System::String ^ GetComponentName(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static string? GetComponentName(object component, bool noCustomTypeDesc);
public static string GetComponentName(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetComponentName : obj * bool -> string
static member GetComponentName : obj * bool -> string
Public Shared Function GetComponentName (component As Object, noCustomTypeDesc As Boolean) As String
Parametreler
- noCustomTypeDesc
- Boolean
true özel tür açıklama bilgilerini dikkate almamak için; aksi takdirde , false.
Döndürülenler
Belirtilen bileşen için sınıfın adı veya null bileşen adı yoksa.
- Öznitelikler
Özel durumlar
component, null'e eşittir.
component , işlemler arası uzak bir nesnedir.
Açıklamalar
Bu yöntem, bir bileşenin örneğinin adını almak için tasarım zamanında kullanılır. Genellikle, bu yöntem varsa bileşenin sitesinin adını döndürür. Örneğin, bir düğmenin sınıf adı "Sistem. Windows. Forms.Button". Bileşen arabirimini uygularsa ICustomTypeDescriptor alternatif bir ad döndürebilir.
Ayrıca bkz.
- GetComponentName()
- ICustomTypeDescriptor
- GetClassName
- GetFullComponentName(Object)
- CreateInstance(IServiceProvider, Type, Type[], Object[])
- GetReflectionType