Work with .NET generic types
- Last Updated: January 31, 2022
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
A previous section in this book introduces .NET generic
types and describes how to reference them as constructed types in
ABL by substituting the type parameters (see Reference .NET generic types). For example, .NET supports
a generic sorted list object that allows you to create a sorted
list of key/value pairs, where the value of a specified type is
sorted by the key of a specified type. So, to define an object reference
to a .NET sorted list consisting of System.String keys
and System.Int16 values, you can code the following
ABL statement:
|
In this example, the generic type name is constructed
by substituting the ABL primitive type, CHARACTER,
for the key type parameter (first Tparm) and
the ABL AS data type, SHORT, for the value type
parameter (second Tparm).