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


Barbara Jones added new Question What is ANR?   2 days ago

Kamlakar Singh added new Blog Convert Text Document to PDF File   16 days ago

Kamlakar Singh added new Article Introduction to Backbone.js   16 days ago

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