---
title: "What Are Attributes in DotNet?"  
description: "What Are Attributes in DotNet?"  
author: "Anonymous User"  
published: 2012-05-12  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/1444/what-are-attributes-in-dotnet  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What Are Attributes in DotNet?

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 behavior of a method at runtime or maybe even handle UN-managed code.\
C# Provides many Built-in Attributes\
\
Some Popular ones are\
\
- Obsolete\
- DllImport\
- Conditional\
- WebMethod

## Answers

### Answer by Anonymous User

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 behavior of a method at runtime or maybe even handle UN-managed code.\
C# Provides many Built-in Attributes\
\
Some Popular ones are\
\
- Obsolete\
- DllImport\
- Conditional\
- WebMethod


---

Original Source: https://www.mindstick.com/interview/1444/what-are-attributes-in-dotnet

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
