Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Property inheritance
Message
De
28/07/2006 06:02:25
 
 
À
28/07/2006 05:57:14
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01141012
Message ID:
01141014
Vues:
19
Update. Marking the base class mutator as protected and using a new Guid property in the sub-class is the closest I've found:
>   public class BaseClass
>    {
>        protected Guid _guid;
>        public virtual Guid Guid
>        {
>            get { return _guid; }
>            protected set { }             //Needs to be R/O
>        }
>    }
>
>     public class Class2 : BaseClass
>    {
>          public new Guid Guid
>         {
>             get
>             {
>                return base.Guid;
>             }
>             set { _guid = value; }
>         }
>     }
>
Any alternative suggestions ?
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform