Question

I'm trying to build an ConfigurationElement with OpenEdge

USING System.Configuration.ConfigurationSection.
USING System.Configuration.ConfigurationPropertyCollection.

CLASS System.Configuration.foo ABSTRACT INHERITS ConfigurationElement:
   DEFINE PROTECTED OVERRIDE PROPERTY Properties AS CLASS ConfigurationPropertyCollection NO-UNDO GET.
END CLASS.

the error message from compile check:

Attempted to override property or event ''. Only abstract properties and events can be overridden. (15133)

The compiler found the OVERRIDE modifier on a property or event definition but the matching property or event found in one of the super classes was not marked as abstract. Only abstract properties and events can be overridden.

what am I doing wrong ?

public abstract class ConfigurationSection -> is abstract

public abstract class ConfigurationElement -> parent class is abstract

protected internal virtual ConfigurationPropertyCollection Properties { get; } -> property is protected virtual

Was it helpful?

Solution

You are not doing anything wrong, it is simply not possible with OpenEdge.

OpenEdge Help, Define Property Statement:

Override: Specifies that this instance property overrides an abstract property inherited from an ABL or .NET abstract class.

The compiler message you listed confirms it.

But you could create a C# ClassLibrary and subclass the ConfigurationElement therein. By referencing your ClassLibrary DLL in the OpenEdge assemblies.xml file you can access your class like any other .Net framework type.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top