Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Inheritance Dilemma
Message
From
09/09/2005 12:20:24
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01047884
Message ID:
01048174
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform