PreviousNextIndex

GetType( ) method


(Windows only; GUI for .NET only)

Gets a System.Type instance for a .NET class using a fully-qualified class name. Use this method when you need to get the run-time type of an object for which you have no instance and cannot instantiate an instance.

If the type cannot be found, this method returns the Unknown value (?) and optionally throws a .NET Exception.

Return type: System.Type class (from the .NET Framework)

Access: PUBLIC STATIC

Applies to: Progress.Util.TypeHelper class

Syntax
TypeHelper:GetType( INPUT class-name AS CHARACTER  
                  [ , INPUT throw-on-error AS LOGICAL ] ) 

class-name
throw-on-error

The following example gets a System.Type instance for the System.Windows.Forms.Button class:

USING System.Windows.Forms.* FROM ASSEMBLY. 
USING Progress.Util.* FROM ASSEMBLY. 
DEFINE VARIABLE btnType AS System.Type NO-UNDO. 
btnType = TypeHelper:GetType( "System.Windows.Forms.Button" ). 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex