TypeDescriptor.GetClassName Yöntem

Tanım

Belirtilen bileşen için sınıfın adını döndürür.

Aşırı Yüklemeler

Name Description
GetClassName(Object)

Varsayılan tür tanımlayıcısını kullanarak belirtilen bileşen için sınıfın adını döndürür.

GetClassName(Type)

Belirtilen tür için sınıfın adını döndürür.

GetClassName(Object, Boolean)

Özel bir tür tanımlayıcısı kullanarak belirtilen bileşen için sınıfın adını döndürür.

GetClassName(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şen için sınıfın adını döndürür.

public:
 static System::String ^ GetClassName(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static string? GetClassName(object component);
public static string GetClassName(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetClassName : obj -> string
static member GetClassName : obj -> string
Public Shared Function GetClassName (component As Object) As String

Parametreler

component
Object

Object Sınıf adını istediğiniz ad.

Döndürülenler

String Belirtilen bileşen için sınıfın adını içeren.

Öznitelikler

Özel durumlar

component, null'e eşittir.

Açıklamalar

Bu yöntem genellikle parametre türü için Type tam component adı döndürür. Örneğin, bir düğmenin sınıf adı "Sistem. Windows. Forms.Button". uygularsa componentICustomTypeDescriptor, alternatif bir ad döndürebilir.

Bu yöntem, ikinci parametresi olan aşırı yüklenmiş GetClassName(Object, Boolean) yönteme eşdeğerdir false.

Ayrıca bkz.

Şunlara uygulanır

GetClassName(Type)

Kaynak:
TypeDescriptor.cs
Kaynak:
TypeDescriptor.cs
Kaynak:
TypeDescriptor.cs
Kaynak:
TypeDescriptor.cs
Kaynak:
TypeDescriptor.cs

Belirtilen tür için sınıfın adını döndürür.

public:
 static System::String ^ GetClassName(Type ^ componentType);
public static string? GetClassName(Type componentType);
public static string GetClassName(Type componentType);
static member GetClassName : Type -> string
Public Shared Function GetClassName (componentType As Type) As String

Parametreler

componentType
Type

Type Hedef bileşenin.

Döndürülenler

String Belirtilen bileşen türü için sınıfın adını içeren.

Özel durumlar

componentType, null'e eşittir.

Açıklamalar

Bu yöntem, ilişkili sınıf adını bulmak için belirtilen tür için önbelleğe alınmış özel tür tanımlayıcısını kullanır.

Ayrıca bkz.

Şunlara uygulanır

GetClassName(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şen için sınıfın adını döndürür.

public:
 static System::String ^ GetClassName(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static string? GetClassName(object component, bool noCustomTypeDesc);
public static string GetClassName(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member GetClassName : obj * bool -> string
static member GetClassName : obj * bool -> string
Public Shared Function GetClassName (component As Object, noCustomTypeDesc As Boolean) As String

Parametreler

component
Object

Object Sınıf adını istediğiniz ad.

noCustomTypeDesc
Boolean

true özel tür açıklama bilgilerini dikkate almamak için; aksi takdirde , false.

Döndürülenler

String Belirtilen bileşen için sınıfın adını içeren.

Öznitelikler

Özel durumlar

component, null'e eşittir.

component , işlemler arası uzak bir nesnedir.

Açıklamalar

Bu yöntem genellikle parametre türü için Type tam component adı döndürür. Örneğin, bir düğmenin sınıf adı "Sistem. Windows. Forms.Button". component parametresi uygularsaICustomTypeDescriptor, alternatif bir ad döndürebilir.

Ayrıca bkz.

Şunlara uygulanır