GetType( ) method (TypeHelper)Gets a System.Type instance for a .NET class using a fully-qualified class name. Use this method when you must 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:
Applies to:
TypeHelper:GetType ( INPUT class-name AS CHARACTER, INPUT throw-on-error AS LOGICAL )A LOGICAL expression indicating whether to throw an exception if the type cannot be found. If TRUE, the AVM throws an exception. If FALSE, the AVM will not throw an exception.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" ).
© 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |