PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection Namespace / Reflection­Helper Class / Reflection­Helper Methods / Reflection­Helper.​Are­Internals­Visible­To Method

ReflectionHelper.AreInternalsVisibleTo Method

Determines whether the InternalsVisibleToAttribute attribute relationship exists between two assemblies.

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: (
public static bool AreInternalsVisibleTo(
	this Assembly definingAssembly,
	Assembly referencingAssembly


Type: System.Reflection.Assembly
The assembly defining the InternalsVisibleToAttribute attribute.
Type: System.Reflection.Assembly
The assembly referenced by the InternalsVisibleToAttribute attribute.

Return Value

Type: Boolean
true if definingAssembly equals referencingAssembly or if definingAssembly contains an InternalsVisibleToAttribute attribute for referencingAssembly, otherwise false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Assembly. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also