Click here to Skip to main content
15,896,453 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi My friends

the attributes are the important and useful things in c# and other dotnet languages
how can i learn about that??????
is there any full references in msdn about attributes and how to use them???????
is there any good example in c# that uses attributes????????
i want to learn all about attributes,any one can introduce a good reference or example in c#.net to me??????????????
Posted
Updated 6-Jul-11 2:19am
v2

An attribute defines additional information (metadata) that is associated with a class, structure, method, and so on. For example you might define an attribute that determines the type of button that a class will display.

Attributes are specified between square brackets, preceding the item to which they apply. Thus, an attribute is not a member of a class. Rather, an attribute specifies supplemental information that is attached to an item.

refer this for more details:

http://msdn.microsoft.com/en-us/library/aa287992%28v=vs.71%29.aspx[^]

hope this helps :)
 
Share this answer
 
Comments
a.bolandnataj106 6-Jul-11 8:35am    
you are talented P.Singh , it was very usuful
Uday P.Singh 6-Jul-11 8:39am    
thanks :)
Greetings;

In addition to the reccommendations from Uday and 2irfanshaikh, you may want to look into the APress book Applied .NET Attributes from Tom Barnaby and Jason Bock (APress, 2003 ISBN13: 978-1-59059-136-9). Although a bit dated, as its publication coincided with the major release of the .NET 1.1 Framework and CLR, much of what is presented is still applicable with .NET 3.0, 3.5 and 4.0. The authors provide coverage on the following topics: Attribute Fundamentals, Compile-time and Design-time Attributes, Attributes and Runtime Behavior, Building Custom Attributes and Applying Custom Attributes. A chapter preview is available at amazon: http://www.amazon.com/Applied-NET-Attributes-Tom-Barnaby/dp/1590591364/ref=sr_1_1?ie=UTF8&s=books&qid=1309971685&sr=1-1

I hope this was of help...
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900