Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defensive Programming?
Message
De
07/01/2008 04:19:27
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01279830
Message ID:
01279857
Vues:
17
Hi,

>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!
>

How would sub-classing help in such a case? IAC,AFAIK:
(a) MS promise they won't break anything but, more importantly,
(b) They can't 'discontinue' it - you've got the DLL and your application specifies which version of it to use.

See http://msdn2.microsoft.com/en-us/library/ms973843.aspx for some info on this..

Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform