ProfK ProfK - 24 days ago 8
C# Question

What's with using C# attributes with the 'Attribute' suffix?

I'm looking at some C# code that applies several LINQ to SQL attributes with the Attribute suffix, e.g.

ColumnAttribute
, instead of the plain
Column
that I am used to using. Is there any reason but verbosity to do this?

Answer

There is no semantic difference. Probably whoever wrote the code just preferred that notation.

It's also possible that the code was automatically generated using a tool. Code generation tools usually don't bother to strip the Attribute bit from the attribute's type name.