Try OpenEdge Now
skip to main content
GUI for .NET Programming
Accessing and Managing .NET Classes from ABL : Referencing and instantiating .NET classes : Using case sensitivity with .NET objects
 

Using case sensitivity with .NET objects

.NET languages are generally case sensitive with respect to all names and identifiers used in the language. However, because ABL is generally not case sensitive, it minimizes the need to respect case sensitivity when programming with .NET objects. Thus, ABL requires that you specify all qualified and unqualified .NET type names using the correct letter case on the first reference only. After that, you can specify the type name using any letter case.
So, all statements that take a .NET type name, such as the following, must use the case sensitive name if they make first reference to that type name:
*CAST (rObj, System.Windows.Forms.Panel).
*DEFINE VARIABLE rObj AS CLASS System.Windows.Forms.Panel NO-UNDO.
*DEFINE PARAMETER rObj AS CLASS System.Windows.Forms.Panel NO-UNDO.
*USING System.Windows.Forms.* FROM ASSEMBLY.
*rObj = NEW System.Windows.Forms.Panel( ).
Unlike .NET type names, all ABL access to the members of a .NET type are case insensitive. If multiple non-overloaded members of a .NET type have the same name, differing only by letter case, ABL finds only the first one that it encounters in the type definition. For example, if a .NET class has two non-overloaded properties, Foo and foo, ABL always finds Foo or foo, but not both, depending on which one it encounters first. Typically, this does not present a problem for ABL applications, because Microsoft strongly recommends that no class should have members that differ only by the letter case of their names.