Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defensive Programming?
Message
De
07/01/2008 10:42:01
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01279830
Message ID:
01279947
Vues:
25
The reason for subclassing the supplied base classes is the same in .Net as it was in VFP. Subclass so you can have your own form of "base" classes that supply more functionality then the ones that come with the product.

I've been working a lot in Java, which is up to version 6. I'm not aware of classes that changed functionality causing apps to break. But I do see Class Names in the app highlighted in the IDE to indicate that they are flagged as deprecated now. Meaning that a newer, supposidly better version of the class is recommended for usage. But it has a different name.

>I'm wondering if I should be subclassing some very basic .NET classes to protect against Microsoft changing or discontinuing a class in future versions.
>
>This occurred to me with File IO but it obviously applies to others. Right now Streams are used for reading and writing - if I use new StreamWriter() or new StreamReader() all over my code and Microsoft decides in .NET 5.0 to alter or discontinue the functionality - wow, I'd be in for some work!
>
>I guess if I hadn't had to deal with Microsoft's discontinuation of VFP, I wouldn't be asking this question: what do you guys do or think about the above?
>
>Thanks in advance.

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform