What does the assembly keyword mean in the AssemblyInfo.cs. Does it permit to use method inside?

后端 未结 6 924
走了就别回头了
走了就别回头了 2020-12-15 06:16

Saw some code snippet inside AssemblyInfo.cs like

[assembly: someattributename]

What does this code mean?

I even saw some method to

6条回答
  •  遥遥无期
    2020-12-15 06:47

    To the second (edited) part of your answer:

    No, it is not a method call. log4net.Config.XmlConfigurator is also an attribute defined by log4net. (See the documentation for log4net details.) Its exact declaration is

    public class XmlConfiguratorAttribute : ConfiguratorAttribute
    

    What is a little bit misleading in this case is the attribute naming convention. That means when you use an attribute (even on assembly level) you can leave the Attribute suffix from the attribute class name.

提交回复
热议问题