Object-oriented programming (OOPs) Question:

Download Job Interview Questions and Answers PDF

What Are Attributes in DotNet?

OOP Interview Question
OOP Interview Question

Answer:

An Attribute is a declarative tag which can be used to provide information to the compiler about the behaviour of the C# elements such as classes and assemblies.
C# provides convenient technique that will handle tasks such as performing compile time operations , changing the behaviour of a method at runtime or maybe even handle unmanaged code.
C# Provides many Built-in Attributes

Some Popular ones are

- Obsolete
- DllImport
- Conditional
- WebMethod

and Many more.
Members please keep on posting more responses providing more In-Built attributes.

Regards Hefin Dsouza

Download OOP Interview Questions And Answers PDF

Previous QuestionNext Question
What can you do to make class available for inheritance but you need to prevent its method to come in inheritance chain?What is Polymorphism?