C# has an internal access modifier (VB: Friend) to allow access only within the assembly. C++/CLI defines all access with the public/protected/private keywords; this allows more options:
| C++ | C# | VB |
| public | Public | |
| protected | Protected | |
| private | Private | |
| internal | Friend | |
| public protected | internal protected | Protected Friend |
| protected private | not possible | not possible |
With C++/CLI one access modifier defines the access within the assembly, the other one defines the outside access. The order doesn't matter: more access is always from inside. C# internal is done with C++/CLI public private: public within the assembly, private outside of the assembly. Protected within the assembly and private outside of the assembly is not possible with C#, but it is possible with C++/CLI.
Christian
public private has been replaced by internal in the VC2005 tool refresh 's compiler when using public private access specifier,you will get a warning which tells you to use internal instead.
Posted by: Justin Shen | 12/20/2004 at 11:57 AM
Justin, Thanks for the information. I'm just downloading the new build. Let's see what happened to protected private.
Posted by: Christian Nagel | 12/23/2004 at 10:25 AM
AUTHOR: Christian Nagel's OneNotes
IP: 000.000.000.000
DATE: 12/27/2004 10:34:00 AM
Posted by: Christian Nagel's OneNotes | 12/27/2004 at 11:34 AM