I am doing a work in c# and define Attributes. How can we use attributes in c# and define its properties?
Attributes in c#
Hi........
I am doing a work in c# and define Attributes. How can we use attributes in c# and define its properties?class BasicAttributeDemo
I am doing a work in c# and define Attributes. How can we use attributes in c# and define its properties?

Satyapriya NayakRank #47 · 31.5K reputationPosted Dec 18, 2011, 1:32 AM EST
Please refer Our recommended articles
http://www.c-sharpcorner.com/UploadFile/rajaduraip/AttributesInCS11142005000622AM/AttributesInCS.aspx
Thanks
VulpesRank #55 · 29.2K reputationPosted Dec 18, 2011, 2:44 AM EST
Here's an example program using a slightly modified version of your own class.
Notice the warnings that you get when you build the program. However, it still runs fine.
Notice also that if you just use 'Obsolete' the compiler automatically replaces it with 'ObsoleteAttribute':