Click here to Skip to main content
15,847,549 members
Home / Discussions / C#
   

C#

 
GeneralRe: Attributes in C# Pin
Pete O'Hanlon27-Apr-11 2:01
subeditorPete O'Hanlon27-Apr-11 2:01 
GeneralRe: Attributes in C# Pin
Keith Barrow27-Apr-11 2:24
professionalKeith Barrow27-Apr-11 2:24 
GeneralRe: Attributes in C# Pin
Not Active27-Apr-11 3:29
mentorNot Active27-Apr-11 3:29 
GeneralRe: Attributes in C# Pin
Keith Barrow27-Apr-11 3:32
professionalKeith Barrow27-Apr-11 3:32 
GeneralRe: Attributes in C# Pin
Pete O'Hanlon27-Apr-11 3:36
subeditorPete O'Hanlon27-Apr-11 3:36 
GeneralRe: Attributes in C# Pin
Not Active27-Apr-11 3:40
mentorNot Active27-Apr-11 3:40 
GeneralRe: Attributes in C# Pin
Wayne Gaylard27-Apr-11 1:55
professionalWayne Gaylard27-Apr-11 1:55 
AnswerRe: Attributes in C# Pin
ambarishtv28-Apr-11 6:45
ambarishtv28-Apr-11 6:45 
Attribute

Developers can add metadata to their code through attributes. There are two types of attributes, custom and pseudo custom attributes, and to the developer these have the same syntax. Attributes in code are messages to the compiler to generate metadata. In CIL, metadata such as inheritance modifiers, scope modifiers, and almost anything that isn't either opcodes or streams, are also referred to as attributes.<br />
A custom attribute is a regular class that inherits from the Attribute class. <br />
Custom attributes are used by the .NET Framework extensively. Windows Communication Framework uses attributes to define service contracts, ASP.NET uses these to expose methods as web services, LINQ to SQL uses them to define the mapping of classes to the underlying relational schema, Visual Studio uses them to group together properties of an object, the class developer indicates the category for the object's class by applying the [Category] custom attribute. Custom attributes are interpreted by application code and not the CLR.When the compiler sees a custom attribute it will generate custom metadata that is not recognised by the CLR. The developer has to provide code to read the metadata and act on it.

Thumbs Up | :thumbsup:
-ambarish-

QuestionTime-Out for Loop in C#? Pin
JP_Rocks27-Apr-11 0:33
JP_Rocks27-Apr-11 0:33 
AnswerRe: Time-Out for Loop in C#? Pin
V.27-Apr-11 0:41
professionalV.27-Apr-11 0:41 
AnswerRe: Time-Out for Loop in C#? Pin
Wayne Gaylard27-Apr-11 0:48
professionalWayne Gaylard27-Apr-11 0:48 
AnswerRe: Time-Out for Loop in C#? Pin
Pete O'Hanlon27-Apr-11 1:02
subeditorPete O'Hanlon27-Apr-11 1:02 
QuestionXML Search Pin
DJ24526-Apr-11 21:40
DJ24526-Apr-11 21:40 
AnswerRe: XML Search Pin
Pete O'Hanlon26-Apr-11 23:04
subeditorPete O'Hanlon26-Apr-11 23:04 
GeneralRe: XML Search Pin
DJ24526-Apr-11 23:34
DJ24526-Apr-11 23:34 
GeneralRe: XML Search Pin
Pete O'Hanlon27-Apr-11 0:12
subeditorPete O'Hanlon27-Apr-11 0:12 
GeneralRe: XML Search Pin
PIEBALDconsult27-Apr-11 4:06
mvePIEBALDconsult27-Apr-11 4:06 
QuestionAdding missing header information in tiff files Pin
meeram39526-Apr-11 21:12
meeram39526-Apr-11 21:12 
AnswerRe: Adding missing header information in tiff files Pin
Pete O'Hanlon26-Apr-11 23:01
subeditorPete O'Hanlon26-Apr-11 23:01 
AnswerRe: Adding missing header information in tiff files Pin
Ravi Sant10-May-11 0:33
Ravi Sant10-May-11 0:33 
QuestionServices-like platform? Pin
NaNg1524126-Apr-11 12:23
NaNg1524126-Apr-11 12:23 
AnswerRe: Services-like platform? Pin
Justin Helsley26-Apr-11 13:50
Justin Helsley26-Apr-11 13:50 
GeneralRe: Services-like platform? Pin
NaNg1524126-Apr-11 22:34
NaNg1524126-Apr-11 22:34 
GeneralRe: Services-like platform? Pin
Justin Helsley27-Apr-11 22:29
Justin Helsley27-Apr-11 22:29 
QuestionFrequency-shifting Auditory Feedback Pin
mehdiattar26-Apr-11 10:51
mehdiattar26-Apr-11 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.