Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP - .NET blog
Message
De
04/05/2009 01:27:38
 
 
À
02/05/2009 18:22:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01397536
Message ID:
01397719
Vues:
167
>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";}
}
.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform