Try OpenEdge Now
skip to main content
GUI for .NET Programming
Using .NET data types in ABL : .NET null values and the ABL Unknown value (?)
 

.NET null values and the ABL Unknown value (?)

In general, ABL maps the Unknown value (?) to the .NET null value. Thus, if you pass the Unknown value (?) as a .NET method parameter or assign it to a .NET data member or property, ABL converts it to null. However, where .NET defines a default value for a data type, setting a .NET data item to the Unknown value (?) actually sets the data item to the default value specified for the data type. This means that if you set a .NET data type that has a default value to the Unknown value (?), retrieving the value of that data type returns its default value, not the Unknown value (?) that you assigned.
The following table lists the general classes of .NET data types that have default values and the default values that they support.
.NET data types
Default value
Integer numeric types (such as System.Int32 or System.Byte)
0
Decimal or floating point numeric types (such as System.Decimal or System.Single)
0.0
Logical types (System.Boolean)
no