Home > DeveloperSection > Interviews > How do you specify a custom attribute for the entire assembly (rather than for a class)?
Varun Agrawal
Varun Agrawal

Total Post:159

Points:795

Posted on    March-18-2011 12:00 AM

 Assembly Assembly 
Ratings:
 1 Answer(s)
  551  View(s)
Rate this:

Varun Agrawal
Varun Agrawal

Total Post:159

Points:795
Posted on    March-18-2011 12:00 AM

Global attributes must appear after any top-level using clauses and before the first type or namespace declarations.

 An example of this is as follows:
using System;
[assembly : MyAttributeClass] class X {}

Note: That in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs.
















Recent Activities


Sumit Kesarwani added new Question What is the Vector class in java?   yesterday

Anchal Kesharwani added new Blog JSON Syntax   8 days ago

Anchal Kesharwani added new Article How to Send Mail in Node.JS   8 days ago

Top Contributors

Don't want to miss updates? Please click the below button!