Adding ObsoleteAttribute to (or otherwise greylisting) Types not under my control?

Posted by Michael Stum on Stack Overflow See other posts from Stack Overflow or by Michael Stum
Published on 2010-03-22T06:47:25Z Indexed on 2010/03/22 6:51 UTC
Read the original article Hit count: 316

Filed under:
|

Is there a way to somehow mark Types I do not control as Obsolete? Basically I would like to add ObsoleteAttribute to types I do not want to use in my .net Project (i.e., SerializableAttribute)

I believe I can do something like that with FxCop, but ideally I would like to have the compiler already generate warnings for "greylisted" Types?

This should be on a Per-Project level, but sadly "Extension Attributes" don't exist, and adding them at Runtime is too late for ObsoleteAttribute...

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#