Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - .NET blog
Message
From
04/05/2009 11:46:39
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
04/05/2009 11:25:28
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01397536
Message ID:
01397783
Views:
105
>>>So the code must be written... you only get some help in writing it. I'm still quite happy with three line subclassing, like
>>>
>>>define class myJunk as oldJunk of junk.prg
>>>someproperty="nondefault value"
>>>enddefine
>>>
>>>Laconica brevitas, eh? :)
>>
>>
>>I'm just a .Net rookie, but I think in C# the same thing is just as easy. Still just 3 lines of actual code and just as easy to read. The typical formatting of the curly braces you see most folks using simply spreads it all out into a beautiful piece of C# poetry:
>>
>>
>>public class myJunk : oldJunk
>>{
>> public myJunk()
>> {
>>   someproperty = "nondefault value";
>> }
>>}
>>
>>
>>
>>If you like it tighter and ugly, I'm pretty sure you can go with:
>>
>>
>>public class myJunk : oldJunk
>>{
>> public myJunk() {someproperty = "nondefault value";}
>>}
>>
>
>Not the same at all. My example had zero lines of method code.
>
>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?
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform