>>>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";
}
}