Try OpenEdge Now
skip to main content
GUI for .NET Programming
Accessing and Managing .NET Classes from ABL : Accessing .NET class members : Accessing static members of a .NET class

Accessing static members of a .NET class

ABL supports access to the following kinds of .NET static class members:
*Fields (data members)
Microsoft .NET class library documentation indicates a static member in the list of members for a class using the following symbol:
ABL allows you to reference a static .NET member using the same general syntax as an ABL static member, as follows:


[[class-type-name] : ]class-member-reference
The class-type-name is the type name (qualified or unqualified, depending on the USING statements you specify) of the .NET class that defines the static member. Note that ABL supports additional syntax for referencing .NET inner class types (see Referencing .NET class and interface types). The class-member-reference is a read or a write access to a static data member or property, a call to a static method, or a reference to a static event to which you are subscribing or unsubscribing an event handler. For more information on accessing static members of a class in ABL, see the sections on using static members in OpenEdge Development: Object-oriented Programming.
Note: In .NET, you separate the class-type-name from the class-member-reference using a period (.) instead of a colon (:), as in ABL.
For example, the following procedure displays a static property on the Progress.Windows.Form class (MousePosition) without instantiating the class:
USING System.Windows.Forms.* FROM ASSEMBLY.

MessageBox:Show("Mouse Position = " +
                Progress.Windows.Form:MousePosition:ToString( )).
Note: Progress.Windows.Form is an OpenEdge .NET form class that inherits from System.Windows.Forms.Form. For more information, see Creating and Using Forms and Controls.
This property contains the position of your mouse pointer at the moment you access the property. Note that this value is displayed using the static Show( ) method on the Microsoft .NET System.Windows.Forms.MessageBox class.