[Obsolete]

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do people feel about the use of the C# [Obsolete] attribute? I heard it
had some NASTY side effects - though I can't recall what they were - any
input is appreciated...

--Rcihard
 
Richard said:
How do people feel about the use of the C# [Obsolete] attribute? I heard it
had some NASTY side effects - though I can't recall what they were - any
input is appreciated...

The only nasty side effect I've heard about is when you make the use of
the obsolete member an error. At that point, if something is
automatically compiling code (e.g. ASP.NET, or a web service client)
and it uses the member, the code will usually fail to compile in a
hard-to-understand way.

I haven't heard any reasons not to use it in a "warning only" kind of
way.
 
Back
Top