I'm using the Obsolete
attribute (as just suggested by fellow programmers) to show a warning if a certain method is used.
Is there a way to suppress the warning similar to CodeAnalysis' SuppressMessage
at points where the use is justified?
Thank you!
EDIT
This is for [Obsolete("Some message")]
as I need to include some details about the warning. However, #pragma warning disable 612
doesn't work anymore once I add the message to the naked [Obsolete]
attribute...
EDIT 2
Found the right warning number - It is 618 if you have a message following the obsolete attribute.
So to do what I want to do:
#pragma warning disable 618
and then after the call
#pragma warning restore 618
Thanks to Jared Par and Jon Skeet for pointing me in the right direction!