GetTypeFromProgID Method (String)

Type.GetTypeFromProgID Method (String)

.NET Framework 1.1

Gets the type associated with the specified program identifier (ProgID), returning null if an error is encountered while loading the Type.

[Visual Basic]
Overloads Public Shared Function GetTypeFromProgID( _
   ByVal progID As String _
) As Type
public static Type GetTypeFromProgID(
 string progID
public: static Type* GetTypeFromProgID(
 String* progID
public static function GetTypeFromProgID(
   progID : String
) : Type;


The ProgID of the type to get.

Return Value

The type associated with the specified ProgID, if progID is a valid entry in the registry and a type is associated with it; otherwise, a null reference (Nothing in Visual Basic).


Exception Type Condition
ArgumentException progID is a null reference (Nothing in Visual Basic).


This method is provided for COM support. ProgIDs are not used in the Microsoft .NET Framework because they have been superceded by the concept of namespace.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Type Class | Type Members | System Namespace | Type.GetTypeFromProgID Overload List | GetProgIdForType

© 2015 Microsoft