In what condition attributes (class) might have static methods?
static in attributes
Collapse
This topic is closed.
X
X
-
PohihihiTags: None -
Nicholas Paldino [.NET/C# MVP]
Re: static in attributes
Pohihihi,
Attributes can have static methods/properties, just like any other
class. However, you have to remember that a static method/property on an
attribute will not be applicable to the type, but rather, all types.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- casperOne@caspe rshouse.com
"Pohihihi" <pohihihi@hotma il.com> wrote in message
news:u4TTnF%23t FHA.1136@TK2MSF TNGP12.phx.gbl. ..[color=blue]
> In what condition attributes (class) might have static methods?
>[/color]
-
Pohihihi
Re: static in attributes
Actually I am not understanding what you mean by[color=blue]
> attribute will not be applicable to the type, but rather, all types[/color]
you mean it will behave like
[AttributeUsage( AttributeTarget s.All)]
??
Thanks,
Po
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
message news:%23lZRIsAu FHA.3588@tk2msf tngp13.phx.gbl. ..[color=blue]
> Pohihihi,
>
> Attributes can have static methods/properties, just like any other
> class. However, you have to remember that a static method/property on an
> attribute will not be applicable to the type, but rather, all types.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - casperOne@caspe rshouse.com
>
> "Pohihihi" <pohihihi@hotma il.com> wrote in message
> news:u4TTnF%23t FHA.1136@TK2MSF TNGP12.phx.gbl. ..[color=green]
>> In what condition attributes (class) might have static methods?
>>[/color]
>
>[/color]
Comment
Comment