In Managed C++, if you have #using <assembly> as_friend in a cpp file, the compiler will reach the not-public types from the other assembly. However you will get MethodAccessException during runtime if you forget adding the InternalsVisibleTo attribute with the actual assembly name to that (friend) assembly. The Exception comes right before the method is called which is using an internal type.