Wrox Programmer Forums
|
C# 4.0 aka C# 2010 General Discussion Discussions about the C# 4.0, C# 4, Visual C# 2010 language and tool not related to any specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 4.0 aka C# 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2011, 02:46 PM
Authorized User
 
Join Date: Nov 2010
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Post Attributes

Hi,

Why do we need attributes in c sharp, and what are their purpose?

Plz help me.

Thanks
 
Old October 21st, 2011, 04:38 PM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

Attributes offer metadata. Such information is used by the compiler (e.g. ObsoleteAttribute), by Visual Studio, by classes from the Framework (serialization, WCF...).
You should read the Reflection chapter of Professional C# 4 for more information on attributes.

I hope this helps,
Christian
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel





Similar Threads
Thread Thread Starter Forum Replies Last Post
Display HTML Attributes from XML Attributes rangeshram XSLT 3 March 27th, 2010 01:14 PM
Get ACL Attributes ruisolid C# 2005 0 August 23rd, 2007 07:41 AM
Attributes and Reflection eadred General .NET 0 July 22nd, 2005 01:53 AM
Elements and attributes Morrislgn XSLT 1 June 20th, 2005 11:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.