开发者

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 ac开发者_运维知识库cess to your assembly's internal members, but I'd like to use a more specific term than "line".

Thanks!


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


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) ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜