problem.
-
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
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 )
-
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 )
-
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
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.
-
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
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