Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What are Attributes in C#

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-11-2009
Member
 
Join Date: Nov 2009
Posts: 63
What are Attributes in C#
  

I am learning Csharp to work on .Net platform. This is the first time I am trying my hands on software programming. Although I have to admit that Csharp is really a good programming language, but I am finding it quite difficult to grasp. I am confused about Attributes in Csharp. I am not able to learn this topic. Can anyone explain it to me. Please help.

Reply With Quote
  #2  
Old 13-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,947
Re: What are Attributes in C#

In Csharp you can releate a code and declarative data using Attribures. This code can be methods, type, properties, etc. The Attribute acted upon at runtime. The Reflection procedure is used to querry the Attribute. Attributes are basically sagrigated into two: One which are said to be the custom attributes. These custom attributes are helpful in applying some more inforamation for your Csharp program code. The other types of Attributes are those which are defined in the Base Class library of Common Language Runtime.
Reply With Quote
  #3  
Old 13-11-2009
Member
 
Join Date: May 2008
Posts: 2,291
Re: What are Attributes in C#

In simple language, it is way using which we can associate the Declarative information with defined C sharp types. C sharp Attributes are capable of assigning your program with meta-data.We are allowed to create Custom Attributes also. For creating custom attributes we need to define an Attribute class. This class derives from the System.Atrributes. Attributes can useful for defining Documentation information which is a Design-Time information, or even Run-Time information. It can even be useful in defining whether a member is allowed or not to be a part of the transcation. Attributes are commonly used when interacting with COM i.e Component Object Model.
Reply With Quote
  #4  
Old 13-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: What are Attributes in C#

Attributes are a new kind of declarative information in C#. To mark any element of code which includes class or method, we can use Attributes. C Sharp Attributes have the capability to be placed on any declaration. Attributes can be used in defining design level inforamation as well as run time information.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What are Attributes in C#"
Thread Thread Starter Forum Replies Last Post
Changing folder attributes Deffen-Baugh Vista Help 5 24-11-2011 02:45 AM
Implementing attributes on a Webpage Beverly Archer Technology & Internet 5 15-03-2010 08:48 AM
How to use Attributes for Validation Appaji Software Development 5 11-02-2010 02:24 AM
How to get the value of AD user attributes in vbscript? PARRISH Active Directory 2 20-11-2009 11:13 PM
LDAP attributes map?? Hela Active Directory 2 25-12-2008 10:00 PM


All times are GMT +5.5. The time now is 12:03 AM.