TypeDescriptor.GetClassName メソッド

定義

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

オーバーロード

名前 説明
GetClassName(Object)

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

GetClassName(Type)

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

GetClassName(Object, Boolean)

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

GetClassName(Object)

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

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

パラメーター

component
Object

クラス名を指定する Object

返品

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

例外

componentnullです。

注釈

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

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

こちらもご覧ください

適用対象

GetClassName(Type)

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

public:
 static System::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

例外

componentTypenullです。

注釈

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

こちらもご覧ください

適用対象

GetClassName(Object, Boolean)

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

public:
 static System::String ^ GetClassName(System::Object ^ component, bool noCustomTypeDesc);
public static string GetClassName(object component, bool noCustomTypeDesc);
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

例外

componentnullです。

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

注釈

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

こちらもご覧ください

適用対象