Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my Base class

C#
public class BaseClass
{
    public string property1
    {
        get;
        set;
    }
    public string property2
    {
        get;
        set;
    }
    public string property3
    {
        get;
        set;
    }
}

and this is my derived class

C#
public class DerivedClass : BaseClass
{

    private override string property3
    {
        get;
        set;
    }
}


I want to hide proerty3 in derived class. but i am getting this error "virtual or abstract members cannot be private".

How i can hide the base class property?

Thanks in advance.
Posted
Updated 31-Jan-13 22:10pm
v3

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900