Results 1 to 4 of 4

Thread: What are Attributes in C#

  1. #1
    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    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.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    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.

Similar Threads

  1. Changing folder attributes
    By Deffen-Baugh in forum Vista Help
    Replies: 5
    Last Post: 24-11-2011, 03:45 AM
  2. Implementing attributes on a Webpage
    By Beverly Archer in forum Technology & Internet
    Replies: 5
    Last Post: 15-03-2010, 08:48 AM
  3. How to use Attributes for Validation
    By Appaji in forum Software Development
    Replies: 5
    Last Post: 11-02-2010, 03:24 AM
  4. How to get the value of AD user attributes in vbscript?
    By PARRISH in forum Active Directory
    Replies: 2
    Last Post: 21-11-2009, 12:13 AM
  5. LDAP attributes map??
    By Hela in forum Active Directory
    Replies: 2
    Last Post: 25-12-2008, 11:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,658,685.22479 seconds with 17 queries