Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Inheritance Dilemma
Message
De
09/09/2005 12:20:24
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01047884
Message ID:
01048174
Vues:
18
Yes, you should. Interfaces just guarantees that an object has a specific set of methods and properties defined. You then add the code as needed to each method and set the properties just like you would, without an interface.

If you want to use the code from another object, a lot of times I like to use composition, instead of inheritence. It offers a more flexible design and you can compose any number of classes.

Aloha,

James


>I currently have the BasePath property defined in my base page class and I set it in OnLoad() event to be the full URL path to the root of my website (using Request.ServerVariables). Then I can build paths to different subfolders in my website no matter what server my sight is running on.
>
>I have not used Interfaces yet. Would I be able to access Request.ServerVariables in the get() method of my property if I were to define it in an Interface?
>
>Matt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform