Articles → CSHARP → Attribute In C#Attribute In C#This article describes attributes in C#.What Is An Attribute? Attributes provide a means to associate declarative information with types, methods, and properties.Declarative Information The declarative information specifies what the associated types, methods, and properties need to be performed but does not explain how to implement them. Consider an example of the following HTML tag.<b>text</b>The above tag instructs the browser to display the text in bold, but it does not provide any steps to achieve this.Syntax [Attribute_Name] ElementExample [Obsolete] public int MyObseleteProperty { get; set; }In the above code, we mark the method as obsolete but do not specify any steps for achieving it.Posted By - Karan Gupta Posted On - Thursday, February 16, 2017 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
<b>text</b>
[Attribute_Name] Element
[Obsolete] public int MyObseleteProperty { get; set; }
Query/Feedback