What is the scope of a friend assembly statement?
Example:
A.cs
[assembly: InternalVisibleTo("Friend")]
internal class A { ... }
B.cs
internal class B { ... }
Will class B
be accessible for an assembly called "Friend"?
Is the scope the whole project (even the assembly statement is only set in one single class)?
The attribute is not applied to the class, this is because the keyword assembly:
stands before it. This means the attribute is applied to the whole assembly.
As you can see on the MSDN page. The declaration of the attribute specifies that it can only be applied to assemblies. And therefor makes every internal in the assembly visible to the "friend" assembly.