C# - are private members inherited?

Posted by Petr on Stack Overflow See other posts from Stack Overflow or by Petr
Published on 2010-06-01T14:55:30Z Indexed on 2010/06/01 15:03 UTC
Read the original article Hit count: 170

Filed under:
|
|

Hi, Just seen one tutorial saying that:

Class Dog
{
  private string Name;
}
Class SuperDog:Dog
{
 private string Mood;
}

Then there was an UML displaying that SuperDog will inherit Name as well. I have tried but to me it seems that only public members are inherited. At least I could not access Name unless it was declared as public. Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about inheritance