1 Replies - 1910 Views - Last Post: 02 March 2009 - 05:34 AM Rate Topic: -----

#1 mud82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 13-February 09

C# visibility question compared to java

Posted 02 March 2009 - 03:28 AM

sometimes in java people think protected means only inherited else private; however default, protected and public all act the same if all the classes are all in the same package.

So my question is about c#. is protected really only accessible to inherited classes or is there some funny thing going on with namespaces like there is with java's packages.

Thanks.
Is This A Good Question/Topic? 0
  • +

Replies To: C# visibility question compared to java

#2 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: C# visibility question compared to java

Posted 02 March 2009 - 05:34 AM

no protected methods,variables are only available to the class to which they are inherited and for same package c# defines special keyword called as internal. You can refer to this link

http://msdn.microsof...91b(VS.80).aspx

This post has been edited by prajayshetty: 02 March 2009 - 05:36 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1