Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Does Visual COBOL support Constructor Initializers ?

$
0
0

This is code from a C# program:

using DevExpress.Xpo;

public class Customer : XPObject {
    public Customer() {}
    public Customer(Session session) :
            base(session) {
    }
XPObject and Session are DevExpress classes used for data binding.

In C#, a constructor initializer is the code that comes after a colon in a method definition.

My understanding is that ": base(session)" in the overloaded constructor will execute the overloaded constructor in the inherited class XPObject passing it the "session" parameter.  How would you code the above in Visual COBOL ?  I can't find documentation on it.  When DevExpress calls the Customer(Session) constructor, the constructor execution sequence should be:

- System.Object.Object

- XPObject (Session)

- Customer(Session)  which in my COBOL program would be NEW(Session).


Viewing all articles
Browse latest Browse all 4356

Trending Articles