The attribute is applied at the assembly level.
This means that it can be included at the beginning of a source code file,
or it can be included in the AssemblyInfo file in a Visual Studio project.
You can use the attribute to specify a single friend assembly that can access
the internal types and members of the current assembly.
You can add an attribute at the beginning of the source code file . You cannot mark any one method, see MSDN - Documentation .
if you want to separate the visible and invisible class methods, you can do the following:
:
InternalsVisibleTo("NameOfOtherAssembly")]
public partial class Foo
{
internal void Visible(){}
}
:
public partial class Foo
{
internal void IsNotVisible(){}
}