RE: () in attribute declaration by wdudek
wdudek
Mon Mar 17 09:40:01 CDT 2008
Thanks everyone, I kind of figured as much, but it's good to know for sure.
""Steven Cheng"" wrote:
> Hi wdudek,
>
> both syntax is correct and there is no difference between them. You can
> think them as the two declaration that one is use the default constructor
> implicitly while another call the constructor explicitly(parameterless
> constructor).
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
> >From: =?Utf-8?B?d2R1ZGVr?= <wdudek@newsgroup.nospam>
> >Subject: () in attribute declaration
> >Date: Wed, 12 Mar 2008 09:05:01 -0700
>
> >
> >I have seen attributes, specifically Serializable declared in 2 ways and
> was
> >wondering if anyone had any insight on the differance if there is any.
> These
> >2 ways are [Serializable] and [Serializable()]. Does the addition of the
> >parenthesis do anything? Is this calling a constructor? Both seem to have
> the
> >same effect in the end, but it seems like they should do something
> differnt?
> >
>
>