Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defensive Programming?
Message
De
07/01/2008 11:03:07
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01279830
Message ID:
01279958
Vues:
14
>>>> How would sub-classing help in such a case?
>
>Simple example: If you use "new StreamWriter()" all over the code as opposed to one place in your own subclass - if/when the functionality (of StreamWriter) gets changed or discontinued, you either have hundreds of places to modify or one place--in your class code.
>
>So you don't subclass anything?

Yes, for the same reasons that Bonnie mentioned. But that won't help if the underlying .NET class functionality changes.

>Do you believe base classes in .NET version 2.0 will work the same in .NET 5.0 or 7.0?

Did you read the link - it doesn't matter. Your application will continue to use the DLLs that are specified in the manifest. If you want to take advantage of new functionality modify your code and compile against the newer version.

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

Click here to load this message in the networking platform