protected internal

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aaryan
    New Member
    • Nov 2006
    • 82

    protected internal

    hi all,
    again i need a clarification. the access modifier protected means that class members are accessible from its own class and its derived class only.
    internal means that the class member is accessible in its own assembly.
    protected internal is the union of both. does it mean that derived classes may reside in different assembly too and hence this novel modifier 'protected internal' came into existence????
    hope i have conveyed my doubt clearly.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Here is an article that may help:
    Object Oriented C# for ASP.NET Developers

    Comment

    • aaryan
      New Member
      • Nov 2006
      • 82

      #3
      Originally posted by kenobewan
      Here is an article that may help:
      Object Oriented C# for ASP.NET Developers
      thank u kenobewan,
      that site is of use to me. can u just clear another doubt. the difference between hiding and overriding.

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        Here is an article that may help:
        Overriding, Shadowing and Hiding in .NET

        Comment

        • aaryan
          New Member
          • Nov 2006
          • 82

          #5
          Originally posted by kenobewan
          Here is an article that may help:
          Overriding, Shadowing and Hiding in .NET
          hi, went thro; the website.thanks for that but can u just give me a code example for the following statement extracted from the same site.

          The difference lies when you call the derived class object with a base class variable.In class of overriding although you assign a derived class object to base class variable it will call the derived class function. In case of shadowing or hiding the base class function will be called.

          i feel an example for this will create a strong understanding for this.

          Comment

          Working...