getBoxedPrimitive

getBoxedPrimitive(): Any;

The getBoxedPrimitive method of the JadeDotNetType class returns a JADE primitive value for a .NET object that contains a type that maps to a JADE primitive type. An exception (14579 - Not a valid .NET object for this method) is raised if the .NET object is not of a type that can be mapped to a JADE primitive.

The following example shows the use of the getBoxedPrimitive method.

vars
    a : Any;
    x : JadeDotNetType;
    t : TimeStamp;
begin
    create x;
    // Create .NET object from primitive
    // (similar to using createDotNetObject(), to create the .NET object)
    x.createBoxedPrimitive(t);
    // 'x' can now be used where a JadeDotNetObject is used
    // Get back a JADE primitive from previously created .NET object
    a := x.getBoxedPrimitive();
    write a;
epilog
    delete x;
end;