TypeDescriptor.GetClassName メソッド

定義

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

オーバーロード

GetClassName(Object)

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

GetClassName(Type)

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

GetClassName(Object, Boolean)

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

GetClassName(Object)

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

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

public:
 static System::String ^ GetClassName(System::Object ^ component);
public static string GetClassName (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です。

注釈

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

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

こちらもご覧ください

適用対象

GetClassName(Type)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
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 を返します。

例外

componentTypenullです。

注釈

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

こちらもご覧ください

適用対象

GetClassName(Object, Boolean)

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

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

public:
 static System::String ^ GetClassName(System::Object ^ component, bool noCustomTypeDesc);
public static string GetClassName (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 はプロセス間リモート オブジェクトです。

注釈

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

こちらもご覧ください

適用対象