Try OpenEdge Now
skip to main content
GUI for .NET Programming
Using .NET data types in ABL : .NET boxing support
 

.NET boxing support

In a .NET language, like C#, you can automatically assign between a primitive data type, like int, and a System.Object. For example, .NET automatically converts (boxes) an int into a System.Object that contains the same System.Int32 value. .NET also automatically converts (unboxes) a System.Object that contains a System.Int32 into the same int value whenever assigning or passing method parameters between the two. ABL provides a similar form of boxing and unboxing support when assigning values or passing method parameters between an ABL primitive or array type and a corresponding .NET System.Object or array object type. ABL provides this boxing and unboxing support automatically for assignments, and as appropriate when passing parameters to .NET methods. However, when passing parameters to ABL routines, you must manually box and unbox as needed using built-in ABL functions. The following sections describe this ABL boxing support:
*Automatic boxing
*Manual boxing
* Automatic boxing
* Manual boxing