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?
VulpesPosted Dec 18, 2011, 7:44 AM
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':
Satyapriya NayakPosted Dec 18, 2011, 6:32 AM
Please refer Our recommended articles
http://www.c-sharpcorner.com/UploadFile/rajaduraip/AttributesInCS11142005000622AM/AttributesInCS.aspx
Thanks