General attribute syntax for both Delphi and C# is basically the same, and immediately precedes the symbol that it modifies:
~~~~~~~~~~~~~~~~~~~~~~~~~
[AttributeTypeName(Parameter, Parameter)]
public class Foo { ... }
~~~~~~~~~~~~~~~~~~~~~~~~~
One thing to note: Attributes, by convention, generally always end in the word Attribute. For example, DesignerAttribute and ComVisibleAttribute. Most compilers allow you to leave off the "Attribute" portion of the type name.
What is a good use of an attribute? Most development environments have a special design time class that allows you to manipulate a component or control at design time. The DesignerAttribute allows one to easily do this:
~~~~~~~~~~~~~~~~~~~~~~~~~
[DesignerAttribute("MyControlDesigner")]
public class MyControl : System.Windows.Forms.Control
~~~~~~~~~~~~~~~~~~~~~~~~~
When a WinForms designer attempts to create a designer for MyControl, it will find the DesignerAttribute on the class and create an instance of the MyControlDesigner for it.
Assembly level attributes are useful for other things, such as specifying the version, author, company name, etc. for the assembly:
~~~~~~~~~~~~~~~~~~~~~~~~~
[assembly: AssemblyTitle("This is my cool assembly")]
[assembly: AssemblyDescription("It does neat stuff")]
[assembly: AssemblyCompany("Borland Software Corporation")]
[assembly: AssemblyVersion("1.0.3.5")]
~~~~~~~~~~~~~~~~~~~~~~~~~
Let's see how to get the attribute we are after from a class...

