Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - .NET blog
Message
From
04/05/2009 01:27:38
 
 
To
02/05/2009 18:22:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01397536
Message ID:
01397719
Views:
163
>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";}
}
.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform