Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - .NET blog
Message
From
04/05/2009 14:17:46
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
04/05/2009 12:39:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01397536
Message ID:
01397820
Views:
107
>>>BTW, does the parent constructor code run or not? How does one control that?
>>
>>Dragan,
>>Because of my lack of experience with VFP code, I don't understand what your code sample is doing. Was your code sample actual code or an algorithm?
>
>- Ha, ha - said the count in Portuguese
> (by Alexandre Dumas, fils)
>
>It just defines a class which differs from its parent by one property (or more, if need be). The example
>
>
define class myJunk as oldJunk of junk.prg
>someproperty="nondefault value"
>enddefine
>
>is generic, but it's still a true replica of what I'm actually doing at times. For example, in a cursor related class, all the behavior is already defined in a parent class, the specific subclass needs no code of its own, only to set the alias, name of primary key field and maybe a couple of special fieldlists. The above is exactly what I do - subclass them only to give them a separate set of properties. These classes have no method code of their own whatsoever.

I'm confused as to why you think .NET is lacking...
public class MyJunk: OldJunk
{
   public myJunk() : base()
   {
      this.SomeProperty = "nondefault value";  
   }
}
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform