Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constructor firing Inheritance in C#
Message
 
 
À
20/01/2006 13:48:35
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01088705
Message ID:
01089399
Vues:
14
This has been an interesting thread to follow. Thanks for all of your replies.

I wont refactor - I dont chew my cabbage twice ;-) Just kidding

My head is slightly stuck in VFP's object model.
DEFINE CLASS BizObj AS Session
TableName = ""

PROCEDURE Init
   this.LoadData()
ENDPROC

PROCEDURE LoadData()
    LOCAL lcTable
    lcTable = this.TableName
    SELECT * FROM &lcTable
ENDPROC
ENDDEFINE

DEFINE CLASS AuthorsBizObj
TableName="Authors"
ENDDEFINE
So simple ;-) VFP realizes that TableName is a property of the superclass.

Bonnie, your answer works, but I have issues with it (not you, the language ;-) )

First that I'm ticked that the platform doesnt have what I would consider such a basic OO option. When subclassing is to extend/override the behavior and field values/properties, why cant an initializer override an existing field or property - sheesh!

What if I want the information to be private ? Dont have to answer - just

Thanks again everyone.
Rick
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform