applications of attributes

Hello Everybody,

Attributes can be used is to represent metadata for program elements.Can you please tell me or point me to sites which describe the motivation behind attributes i.e. I want to know how the coding of the same thing could be done with & without using attributes.One or two simple and another complete application could be useful.

   
          Thank you very much.


Answer this question

applications of attributes

  • ExchangeData

    Check out this page: http://msdn.microsoft.com/library/default.asp url=/library/en-us/csref/html/vcwlkattributestutorial.asp

    The tutorial explains possible usage of attributes.

    The main point about attributes is extensibility. Custom attributes provide a means to communicate something about a component. They can be user attributes, runtime attributes, or compile time attributes depending on the element of the system they interact with. You can apply attributes to your own code but you can also define your own attribute with your own specific semantic. For example, you can use attributes to specify tests.
    Are their other ways to achieve the same goal In some cases yes, but most of the time, using attributes improves productivity and flexibility not available through other means.

  • applications of attributes