Language

TypeDescriptor.GetClassName メソッド

定義

指定したコンポーネントのクラスの名前を返します。

オーバーロード

名前 説明
GetClassName(Object)

既定の型記述子を使用して、指定したコンポーネントのクラスの名前を返します。

GetClassName(Type)

指定した型のクラスの名前を返します。

GetClassName(Object, Boolean)

カスタム型記述子を使用して、指定したコンポーネントのクラスの名前を返します。

GetClassName(Object)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

既定の型記述子を使用して、指定したコンポーネントのクラスの名前を返します。

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

パラメーター

component
Object

クラス名を指定する Object 。

返品

指定したコンポーネントのクラスの名前を含む String 。

属性

例外

component は nullです。

注釈

通常、このメソッドは、Type パラメーター型の完全なcomponent名を返します。 たとえば、ボタンのクラス名は "System.Windows。Forms.Button"。 componentがICustomTypeDescriptorを実装している場合は、代替名を返すことができます。

このメソッドは、GetClassName(Object, Boolean) の 2 番目のパラメーターを持つオーバーロードされたfalse メソッドと同じです。

こちらもご覧ください

適用対象

GetClassName(Type)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

指定した型のクラスの名前を返します。

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

パラメーター

componentType
Type

ターゲット コンポーネントの Type 。

返品

指定したコンポーネント型のクラスの名前を含む String 。

例外

componentType は nullです。

注釈

このメソッドは、指定した型のキャッシュされたカスタム型記述子を使用して、関連付けられているクラス名を検出します。

こちらもご覧ください

適用対象

GetClassName(Object, Boolean)

ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs
ソース:
TypeDescriptor.cs

カスタム型記述子を使用して、指定したコンポーネントのクラスの名前を返します。

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

パラメーター

component
Object

クラス名を指定する Object 。

noCustomTypeDesc
Boolean

true カスタム型の説明情報を考慮しない場合。それ以外の場合は false。

返品

指定したコンポーネントのクラスの名前を含む String 。

属性

例外

component は nullです。

component は、プロセス間のリモート オブジェクトです。

注釈

通常、このメソッドは、Type パラメーター型の完全なcomponent名を返します。 たとえば、ボタンのクラス名は "System.Windows。Forms.Button"。 component パラメーターがICustomTypeDescriptorを実装している場合は、代替名を返すことができます。

こちらもご覧ください

適用対象