[Obsolete]

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
 
J

Jon Skeet [C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top