Watch Pre-recorded Live Shows Here
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Marc
1.9k
205
46.6k
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;}
}
Reply
Answers (
4
)
How can i get DomainName of users accessing the website that
regex