SYSK 33: New kind of “friend” -- assembly:InternalsVisibleTo
An internal type or internal member in an assembly can now be accessed from another assembly. Yes, you heard right. There is a new assembly level attribute that allows you to give one assembly access to another assembly's internal types and members – it’s called InternalsVisibleToAttribute attribute. However, this new attribute is only available in C# (sorry, VB.NET developers).
Here is the usage example: [assembly:InternalsVisibleTo("MyOtherAssembly")]
Note: if assembly A gives assembly B access to its internal types and members, and then assembly B, in its turn, gives assembly C access to its members, assembly C does not automatically become a friend of assembly A.
Comments
- Anonymous
January 04, 2006
It's also works for c++ cli/managed c++/c++.net or whatever else it's called =]
nice find though.