Gets the Type associated with the specified program identifier (progID), specifying whether to throw an exception on error while loading the Type.
[Visual Basic] Overloads Public Shared Function GetTypeFromProgID( _ ByVal progID As String, _ ByVal throwOnError As Boolean _ ) As Type [C#] public static Type GetTypeFromProgID( string progID, bool throwOnError ); [C++] public: static Type* GetTypeFromProgID( String* progID, bool throwOnError ); [JScript] public static function GetTypeFromProgID( progID : String, throwOnError : Boolean ) : Type;
-or-
false to ignore errors while loading the Type.
The Type associated with the specified program identifier (progID), if progID is a valid entry in the registry and a type is associated with it; otherwise, a null reference (in Visual Basic Nothing).
Exception Type | Condition |
---|---|
SecurityException | The requested Type is non-public and the caller does not have ReflectionPermission to reflect non-public objects outside the current assembly. |
TargetInvocationException | A class initializer is invoked and throws an exception. |
This method is provided for COM classic support. Program IDs are not used in the NGWS runtime because they have been superceded by the concept of namespace.
Type Class | Type Members | System Namespace | Type.GetTypeFromProgID Overload List | GetType