Public class ClassB : ClassA
{
}
public class GeneralClass
{
public ClassA test
{
get{}
set{}
}
}
public class specificClass :GeneralClass
{
public ClassB test
{
get{}
set{}
}
}
As you can see the property test is inherited in specificClass from generalClass but here I want to change the type to ClassB (ClassB:ClassA
) . can I do something like this so anytime I'm using the specializedClass.test
I don't need to typecast it to classB ?
edit 1 : I forgot to mention that now it's giving me the warning that test hide inherited member test .use new keyword if hiding is intended .