Alix
Alix

Reputation: 925

What is [assembly: InternalsVisibleTo("MyAssembly")]? A statement, directive, ...?

Sorry about the vocabulary question but I can't find this anywhere: how do you call this below?

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("MyAssembly")]

Is it a statement, a directive, ... ? I want to indicate that you have to insert that line in order to give MyAssembly access to your assembly's internal members, but I'd like to use a more specific term than "line".

Thanks!

Upvotes: 5

Views: 397

Answers (2)

JaredPar
JaredPar

Reputation: 754853

The C# language spec refers to it as an Attribute Specification (section 17.2).

Attribute specification is the application of a previously defined attribute to a declaration. An attribute is a piece of additional declarative information that is specified for a declaration. Attributes can be specified at global scope (to specify attributes on the containing assembly or module) ...

Upvotes: 4

Darin Dimitrov
Darin Dimitrov

Reputation: 1038930

It's a Global Attribute applied at the assembly level.

Upvotes: 7

Related Questions