Yes. The brackets are really only needed when you're specifying
arguments/properties.
and so is the attribute part of the term for C#
ex. [myattribute] can be written as [my]
--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog:
http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
Tony Johansson <jo*****************@telia.comwrote:
>If you want to associate an attribute with a class you put the attribute
just before the class definition.
Like this
[myAttribute()]
public class myClass
{//some code here }
I know that it's possible to associate an attribute with an assembly.
But if you want to associate an attribute with an assembly where do you
put
the attribute then?
It doesn't matter - you just need to use "assembly:" appropriately. See
the autogenerated AssemblyInfo.cs file for examples.
>My second question about attribute is it the same if I write the
attribute
like this
[myAttribute()]
or
like this
[myAttribute]
Yes. The brackets are really only needed when you're specifying
arguments/properties.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too