Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class design or rather redesign
Message
 
À
17/03/2005 11:33:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00996809
Message ID:
00996885
Vues:
14
Cetin,
I guess your analogy makes sense, but in my case I want to show the user the new property if XP or higher and a different property if less than XP.
Hmm I think I have made my mind up. I am going to create another "smart" property that will return old property is less than XP and new property if XP or higher and also expose the individual properties but return null for new property if less than XP.

When given a choice of two things I like to choose both <bg>

Thanks for your help. Sometimes it helps just "talking" to someone.

Einar

>I'm not sure I understood exactly. Maybe an analogy might be like this:
>Reports:
>I have a few reports that are directly done calling excel.
>
>If excel is not installed user doesn't even see those reports are available. It's noted in documentation.
>
>So probably my answer is class "smart" to expose it if XP or higher:)
>Cetin
>
>>Cetin,
>>Correct, but I am not having problems assigning a value to the property. That will all be taken care of from a static method. The class will acctually mostly be used in conjunction with a collection object which is returned from that static method I mentioned.
>>I quess the question is:
>>Should I make the class "smart" and only expose the property if XP or higher or should I assume that the consumer of the class is smart enough to know that the property will only be valid if XP or higher (maybe go as far as throwing exceptions around if the user is trying use is on less than XP)?
>>
>>Einar
>>
>>>Einar,
>>>Woudln't it be something like:
>>>
>>>{set {if (winXPorLater) _myField = value; }}
>>>
>>>Cetin
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform