createDotNetObject
createDotNetObject(): Any;
The createDotNetObject method of the JadeDotNetType class causes the .NET run time to create the .NET object for which the receiver will act as a proxy.
A transient instance of the JadeDotNetType subclass is created and then this JADE object is used to create the .NET object by executing the createDotNetObject method. The following method shows the use of the createDotNetObject method.
vars b : Basic; // Subclass of JadeDotNetType begin // Create an instance of the JadeDotNetType subclass create b transient; // Create the corresponding .NET object b.createDotNetObject; // Use the JADE proxy to access members of the .NET object write b.getDotNetTypeName; // Outputs SimpleDemo.Basic epilog delete b; end;
The createDotNetObject method creates the .NET object using the default constructor, which has no parameters. Other constructors for the .NET component, which do have parameters, are imported and the corresponding JADE method name is createDotNetObject_n, where n is a number to make the method name unique. For example, if the createDotNetObject_1 method has a signature with a
vars b : Basic; // Subclass of JadeDotNetType begin // Create an instance of the JadeDotNetType subclass create b transient; // Create the corresponding .NET object b.createDotNetObject_1("Meaning of Life", 42); // Use the JADE proxy to access members of the .NET object write b.getDotNetTypeName; // Outputs SimpleDemo.Basic epilog delete b; end;