TypeDescriptor.GetClassName TypeDescriptor.GetClassName TypeDescriptor.GetClassName TypeDescriptor.GetClassName Method

Definition

Returns the name of the class for the specified component.

Overloads

GetClassName(Object) GetClassName(Object) GetClassName(Object) GetClassName(Object)

Returns the name of the class for the specified component using the default type descriptor.

GetClassName(Type) GetClassName(Type) GetClassName(Type) GetClassName(Type)

Returns the name of the class for the specified type.

GetClassName(Object, Boolean) GetClassName(Object, Boolean) GetClassName(Object, Boolean) GetClassName(Object, Boolean)

Returns the name of the class for the specified component using a custom type descriptor.

GetClassName(Object) GetClassName(Object) GetClassName(Object) GetClassName(Object)

Returns the name of the class for the specified component using the default type descriptor.

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
Parameters
component
Object Object Object Object

The Object for which you want the class name.

Returns

A String containing the name of the class for the specified component.

Exceptions

Remarks

Typically, this method returns the full Type name for the component parameter type. For example, the class name for a button is "System.Windows.Forms.Button". If component implements ICustomTypeDescriptor, it can return an alternate name.

This method is equivalent to the overloaded GetClassName(Object, Boolean) method with a second parameter of false.

See Also

GetClassName(Type) GetClassName(Type) GetClassName(Type) GetClassName(Type)

Returns the name of the class for the specified 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
Parameters
componentType
Type Type Type Type

The Type of the target component.

Returns

A String containing the name of the class for the specified component type.

Exceptions

Remarks

This method uses the cached custom type descriptor for the specified type to discover the associated class name.

See Also

GetClassName(Object, Boolean) GetClassName(Object, Boolean) GetClassName(Object, Boolean) GetClassName(Object, Boolean)

Returns the name of the class for the specified component using a custom type descriptor.

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
Parameters
component
Object Object Object Object

The Object for which you want the class name.

noCustomTypeDesc
Boolean Boolean Boolean Boolean

true to consider custom type description information; otherwise, false.

Returns

A String containing the name of the class for the specified component.

Exceptions

Remarks

Typically, this method returns the full Type name for the component parameter type. For example, the class name for a button is "System.Windows.Forms.Button". If the component parameter implements ICustomTypeDescriptor, it can return an alternate name.

See Also

Applies to