How do you specify a custom attribute for the entire assembly?



How do you specify a custom attribute for the entire assembly?..

Answer / Sunil Saini

In C#, you can specify a custom attribute for an entire assembly by applying it to the assembly level declaration in your code. The attribute is placed within square brackets immediately following the 'assembly' keyword. For example: n```csharpn[assembly: MyCustomAttribute()]n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is default value of enum c#?

1 Answers  


what is default accessibility for a class? what is difference b/w viewstate and controlstate? what is the default access specifier for a top level class which are not nested into other classes?

2 Answers  


I want to print "Hello" even before main() is executed. How will you achieve that?

1 Answers   DELL,


Is equal in c#?

1 Answers  


Why do we use partial class in c#?

1 Answers  


Why do we need indexers in c#?

1 Answers  


Why do we use virtual methods in c#?

1 Answers  


How do I use the 'using' keyword with multiple objects?

1 Answers  


What is sqladapter c#?

1 Answers  


What is an inheritance in c#?

1 Answers  


int i = 1; int j = 1; System.Console.WriteLine(i == j); System.Console.WriteLine(i.ToString() == j.ToString()); System.Console.WriteLine((object)i == (object)j); Give the sample code above, what is the output to the console?

5 Answers  


Is c# easier than c++?

1 Answers  


Categories