Marc

Marc

  • NA
  • 205
  • 54.1k

Override

Mar 30 2015 1:37 PM
I have a base class that is sealed and properties I want to be able to override if need be.  These particular properties pull specific information off the local server, so not sure if I need to create a helper class that is not protected so I can override those particular properties.  
 
My question is do I need to write a separate class for those properties or is there another way I can override the properties? Aside from removing my sealed modifier from my base class?
 
example:
 
public sealed class Base
{
       public virtual string ServerInfo{ get; set = value; } 
 
public class WantToBeChild
{
       public override string ServerInfo { get; set = value;}
 
 

Answers (4)