Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. problem.

problem.

Scheduled Pinned Locked Moved C#
helptutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amaneet
    wrote on last edited by
    #1

    Sir/Madam, Can somebody please provide the help with the help of an easy example how to differentiate between Protected Internal Internal protected Please help. Thanks and regards Pankaj Garg

    C H 2 Replies Last reply
    0
    • A amaneet

      Sir/Madam, Can somebody please provide the help with the help of an easy example how to differentiate between Protected Internal Internal protected Please help. Thanks and regards Pankaj Garg

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Protected means that only derived classes can see it internal means that only classes inside the current assembly can see it. Protected Internal would mean that only derived classes within this assembly can see it. 'Problem' is not a very useful header.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      A 1 Reply Last reply
      0
      • C Christian Graus

        Protected means that only derived classes can see it internal means that only classes inside the current assembly can see it. Protected Internal would mean that only derived classes within this assembly can see it. 'Problem' is not a very useful header.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        A Offline
        A Offline
        amaneet
        wrote on last edited by
        #3

        Sir, Sorry for the irrelevant header. Next time i will take care for it. Can u please explain with example the difference b/w internal and internal protected. Thanks and regards Panakj

        S 1 Reply Last reply
        0
        • A amaneet

          Sir, Sorry for the irrelevant header. Next time i will take care for it. Can u please explain with example the difference b/w internal and internal protected. Thanks and regards Panakj

          S Offline
          S Offline
          Sathesh Sakthivel
          wrote on last edited by
          #4

          internal: Access is limited to the current assembly. protected internal: Access is limited to the current assembly or types derived from the containing class.

          Regards, Satips.

          1 Reply Last reply
          0
          • A amaneet

            Sir/Madam, Can somebody please provide the help with the help of an easy example how to differentiate between Protected Internal Internal protected Please help. Thanks and regards Pankaj Garg

            H Offline
            H Offline
            Hayder Marzouk
            wrote on last edited by
            #5

            Hi, Here an example. U have 2 dlls : DLL1 and DLL2. In DLL1 u have a class Employee with a method Fire() In DLL2 u have a class Boss. 1- if u declare the Fire method as protected, in the boss class u can invoke the Fire method and U cannot invoke the fire method anywhere else the Boss class 2- if u declare it as Internal : u can invoke the fire method anywhere in DLL1 but not in DLL2. U cannot also view the method in the Boss class (because it's in the DLL2) 3- If u declare it as Internal protected, u can only invoke the method from a class inheriting from Employee located in the DLL1. HTH. Hayder Marzouk

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups