Reply to thread

The attributes (also called decorations as in, "decorate the method EchoServer with the DebuggerStepThroughAttribute attribute") are extra info for the compiler.


There are a bunch of them and you use them for a variety of reasons. For instance, "[WebMethod]" marks a method as a webservice so that the compiler can generate the proper code. You can add simple attributes like Description to describe a property:

[code=csharp]

[Description("The Min value")]

public int MinValue

{

// property code would go here...

}

[/code]


Assuming the above were part of a user control, the "Description" attribute lets the Property window (in design time) show the description.


If you have any attributes particular you have questions about, ask away :)


-Nerseus


Back
Top