Access static members of a .NET class
- Last Updated: July 5, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Syntax
ABL supports access to the following kinds of .NET static class members:
- Fields (data members)
- Properties
- Methods
- Events
ABL allows you to reference a static .NET member using the same general syntax as an ABL static member, as follows:
|
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 Reference .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.
.)
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:
|
Progress.Windows.Form is an OpenEdge .NET form class that
inherits from System.Windows.Forms.Form. For more
information, see Create and use 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.