Share via


GetType Method (String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the Type object with the specified name in the assembly instance.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overridable Function GetType ( _
    name As String _
) As Type
public virtual Type GetType(
    string name
)
public:
virtual Type^ GetType(
    String^ name
)
abstract GetType : 
        name:string -> Type 
override GetType : 
        name:string -> Type 
public function GetType(
    name : String
) : Type

Parameters

Return Value

Type: System. . :: . .Type
An object that represents the specified class, or nullNothingnullptrunita null reference (Nothing in Visual Basic) if the class is not found.

Remarks

This method only searches the current assembly instance. The name parameter includes the namespace but not the assembly. To search other assemblies for a type, use the Type..::..GetType(String) method overload, which can optionally include an assembly display name as part of the type name.

.NET Framework Security

See Also

Reference

Assembly Class

GetType Overload

System.Reflection Namespace